Search Unity

Malbers Dragons (Closed)

Discussion in 'Assets and Asset Store' started by Malbers, Jun 20, 2016.

  1. jrackley

    jrackley

    Joined:
    Jan 26, 2017
    Posts:
    55
    @Malbers any suggestions on why Unka will not rotate towards the player when flies up and goes into the fire breath.
     
  2. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Have you tried to rotate it manually ?
    I mean..
    you can create a Animator Behaviour component so the rotation code just exist on that animation State and make a look at to the target... I believe you have your player as the target...
    so on the OnStateUpdate() on that animator behaviour
    set something like
    animator.transform.LookAt(target.transform);


    to access any component of your character from an animator behaviour use (animator.GetComponent<>) on the OnStateEnter()

    That's how I access the Animal script on my animator behaviours..
     
    jrackley likes this.
  3. jrackley

    jrackley

    Joined:
    Jan 26, 2017
    Posts:
    55
    lol! That may just be the only thing I haven't tried yet, will give it a go soon, abcessed tooth killing me right now!
     
  4. gnomecake

    gnomecake

    Joined:
    Jan 14, 2018
    Posts:
    2
    Thank you so much! Though, as a beginner, I'm ashamed to admit I'm still at a loss on where to access that. Could that be further explained? (Also I applaud you for the lovely and active feedback.)
     
    Malbers likes this.
  5. francescobr

    francescobr

    Joined:
    Apr 2, 2017
    Posts:
    45
    Today I imported standard assets in my project, and I had to move "Malbers Animations" folder inside Standard Assets folder, otherwise I had an error regarding a Water script. Is there any other way of doing this? Could you explain to me why this happens?
     
  6. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    All Action animations are located on the Sub-state Machine actions.
    upload_2018-1-20_13-32-55.png

    and all the animations have a transition with an ActionID condition...


    for the animation sleep the value is 6

    upload_2018-1-20_14-30-12.png

    so I created a public method to call that animation using their ID Animal.SetAction(6).. for the sleep

    for now Unka only have the sleep action, of future updates I will add more action animations ;)
     
  7. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Really??

    you just could remove the water script from my folder or the one from the standard assets...

    I will give it a try.... which unity are you using?
     
  8. francescobr

    francescobr

    Joined:
    Apr 2, 2017
    Posts:
    45
    2017.2.0f3

    This was the error :

    Assets/Standard Assets/Editor/Water/Water4/WaterBaseEditor.cs(11,17): error CS0246: The type or namespace name `WaterBase' could not be found. Are you missing an assembly reference?

    and googling brought me here :

    https://answers.unity.com/questions/1302579/how-do-i-fix-this-waterbase-error.html

    Thank you!
     
  9. francescobr

    francescobr

    Joined:
    Apr 2, 2017
    Posts:
    45
    I tried removing WaterBase from \Assets\Malbers Animations\Common\Scripts\Utility\Compatible SA\Water\Scripts, but then it kept complaining. I reimported standard assets and now WaterBase is back. I still don't get what I have to delete, sorry :D

    EDIT : I solved moving folder \Assets\Malbers Animations\Common\Scripts\Utility\Compatible SA into Standard Assets folder.
     
    Last edited: Jan 20, 2018
  10. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Just WOW! Thank you so very very much!
     
    Malbers likes this.
  11. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Guys I really really really!!!!!!!! want to make awesome things with Timeline and Cinemachine...
    but my upload unity for the assets is 5.6 ... sooo I was wandering how many of you are using 2017.1 on your projects. and how many of you are using older 5.6...

    I really want to make some cool things for future updates :p:p:p.
     
    username132323232 likes this.
  12. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,274
    Everything below 2017 is outdated. And 2018 is around the corner and the future. Brackeys posted a brief overview this week:



    Who doesn't want 2018? :D

    Also, with the new integration of Substance I expect awesome things, which would more affect your assets. But how Substance turns out remains to be seen.
     
    username132323232 and Malbers like this.
  13. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Definitely 2017.1 and beyond! :)
    Timeline and Cinemachine integration demo would be super-awesome! Can't wait to try it :)
     
    Malbers likes this.
  14. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Let's say I have a target object (a simple cube) that moves around the scene on the ground and in the air. I would like the Dragon to follow the target and automatically switch between walk/trot/run and flying. Is that difficult to do?

    I already tried that by using the Move() function and calling SetFly() based on the position.y value, but the movement looks a bit weird :)
     
  15. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    The Move function uses a direction vector instead of a position vector... so if you want to make them go to that place pass a direction on the parameters of the Move function
     
  16. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Yes, that's what I do (took me awhile to get that though :)):
    Code (CSharp):
    1.   _animal.Move((_target.position - _animal.transform.position));
     
  17. Gontz

    Gontz

    Joined:
    Oct 27, 2016
    Posts:
    11
    Hello,
    I'm trying to get dragon controller to work with behavior designer. Behavior Designer is acting on the navmesh component. And the navmesh component is moving the dragon around. How can I bridge the info from navmesh to Dragon animator? Thanks
     
    username132323232 likes this.
  18. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hi there!
    On the Sample Using the Animal AI Control Script the animator is the one that moves the character instead of the Nav mesh Agent, that way there's no foot sliding...

    but if you are making the Nav Mesh agent move the dragon, Use Animal.Move(vector direction). that will activate the animator values..
     
  19. Gontz

    Gontz

    Joined:
    Oct 27, 2016
    Posts:
    11
    Thank you for the quick reply

    I have this small script:


    void Update () {
    animController.speed = navAgent.speed;
    }
    void OnAnimatorMove ()
    {
    //set the navAgent's velocity to the velocity of the animation clip currently playing
    navAgent.velocity = animController.deltaPosition / Time.deltaTime;
    //set the rotation in the direction of movement
    transform.rotation = Quaternion.LookRotation(navAgent.desiredVelocity);
    }


    How can I use Animal.Move in this context ?
     
  20. Gontz

    Gontz

    Joined:
    Oct 27, 2016
    Posts:
    11
    Or better yet:
    Could you provide a script with the navmesh agent movement bridge to dragons animator?
     
    Malbers likes this.
  21. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    the bridge between the dragon animator and the nav mesh agent is Animal Ai Control -> Animal Script -> Dragon Animator.
    Take a look to that script to see how I connect the Agent to the Animator.. its commented ;)
     
  22. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,274
    username132323232 and Malbers like this.
  23. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    No it isn't. Lots of people still use 5.6 or even lower. Projects can take a long time to develop and developers can't just switch from a working version to the latest, greatest Unity every time a new one comes out.
     
  24. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,274
    This doesn't mean that the rest of the world should be stuck there as well :)
     
    username132323232 likes this.
  25. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Hey, some companies are still running Windows 98 :)
     
    Malbers likes this.
  26. Xype

    Xype

    Joined:
    Apr 10, 2017
    Posts:
    339
    Wow, not fitting for my stuff but I had to chime in and say those are so adorable! Great work!
     
    Malbers likes this.
  27. R1PFake

    R1PFake

    Joined:
    Aug 7, 2015
    Posts:
    540
    Do you have any update on the wyvern model? :D I started Monster Hunter World and love the wyvern models there, i wish someone would make similar wyvern(s) as a asset pack :D
     
    Malbers likes this.
  28. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    My other other partner started to work again on the wyvern, but he is a little slow .... is really good!!! but a bit slow haha

    meanwhile I'm working on the remaining animals..
     
    Rowlan and R1PFake like this.
  29. Salja

    Salja

    Joined:
    Mar 23, 2017
    Posts:
    353
    I like this Unka

    screen_1920x1080_2018-02-04_12-35-30.jpg
     
    WoodenDragon, Rowlan and Malbers like this.
  30. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Hello! Is there a function call to put the dragon in an idle state such as in the "LDM_Functions Calling" scene?

    I tried Animal.SetAction(-1). It seems like an idle state, but not as good as in "LDM_Functions Calling" :)
     
  31. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    I wonder if these lines (look like laser rays) that show up during "fire ball" and "plasma ball" effects supposed to be there? Is there any way to hide them? Thanks!

    fire-plasma balls.gif
     
  32. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    that is a Line Renderer on the FireBall prefab, you can disable it you want.... What unity are you using?
    to see if I can reproduce that problem
     
    username132323232 likes this.
  33. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Thanks! I'm using Unity 2017.3.0f3.

    Unchecking FireBall>Trail Wing>Trail Renderer hides the lines.
     
  34. FairPlayLabs

    FairPlayLabs

    Joined:
    Jul 20, 2013
    Posts:
    9
    Hi. Great asset.

    Is there a way to jump or get out of the water while swimming?
     
  35. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    For the animals ? nope, just you can get out of water on the shore.
    for the little dragons yes!

    but is a good Idea, to add jump out of the water or climb out of the water :), I added to my list of future updates
     
  36. FairPlayLabs

    FairPlayLabs

    Joined:
    Jul 20, 2013
    Posts:
    9
    I have the Unka dragon. Is there a way to do this?

    Im always forced to look for a shore like you mentioned.

    Thanks!
     
  37. headkitgames

    headkitgames

    Joined:
    Oct 30, 2009
    Posts:
    23
    I can't make the AI work in the initial AI example scene. Is there anything I need to do before it works?
    thnx!
     
  38. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Yes!, make sure the Navigation Mesh is baked :)
     
  39. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Hi Malbers! I have several Little Dragons in my scene as NPCs. They all start out in the idle state, so I call Animal.SetAction(-1);

    The problem is that sometimes they move in-sync. I looked in the Animator and found that it alternates between 4 idle animations (Idle 01-04). Is there any way to make sure that every dragon idles differently? For example, specify the starting idle animation in the SetAction() call? Also, I think it would help if the Idle 0x animations were of different lengths.
     
  40. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    You can duplicate the Animator and set as the Default state another idle, (maybe also change the speed on those idle State Animations, on the duplicated animator) .
     
  41. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Sounds good. Thanks!
     
  42. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Is there any way to create a sequence of Dragon actions? For example, I want a dragon to show "Yes", then "No" and then "Confused". So I would call

    Code (CSharp):
    1. Animal.SetAction(107);
    2. Animal.SetAction(108);
    3. Animal.SetAction(106);
    But that of course won't work because we need to space the function calls. Do you have anything already in place to handle this? If not, is it possible to query Animal to see if he's ready for the next action? Thanks!
     
    Malbers likes this.
  43. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Okey that a first request for sequenced actions :) and I like it...

    The Animal Script, if is playing an action, and you call another action it will skip it ... but I like the Idea to make sequence actions :)
    I will add it soon...
     
    neoshaman likes this.
  44. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    That sounds great. Little Dragons are getting better and better :)
     
  45. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,274
    Inspired by the animated gif @Malbers posted some time ago

    dragons.jpg

    I had to try out myself :D

    d01.jpg

    d04.jpg


    d02.jpg


    That little bagy dragon on top of Unka is soooooo cute :)
     
    Malbers likes this.
  46. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,274
    This is so much fun, I had to create a video :D

     
    Malbers likes this.
  47. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    SOOOOO CUUUTEEE!!!!!!!!
     
  48. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    Hi Malbers,

    Thanks for making the dragons, I've just bought the Tiger ones I'll probably get them all if I can figure out a few things.
    I need more variations of skins and colours, aleast 6 more skins and to randomly set the colours when the player clicks a button.

    I am not very familiar with texturing UV's etc.
    But a while back I got the indie version of Substance Painter when it was cheap for just this type of job

    When I opened up Drago in Substance Painter it just had a texture that wasn't in clearly defined UV's
    is there a way for me to get the UV unwraps so I can mask them when painting

    PS Also (ages ago) I got an asset Composite Map https://www.assetstore.unity3d.com/en/#!/content/28788
    Do you rekon that might work with your little dragons?

    Please bare in mind I don't know what I'm talking about,
    I'm just after a couple of pointers really before I go off on a tangent and waste my time.


    Cheers

    Roy
     
  49. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Thanks Roy for your support!
    you can Open the Fbx models on any 3d software to get te UVs... or you want like a BlackWhite map besides the textures?

    I didn't know about that asset, it looks awesome! but I don't know if it will work with the little dragons, but I think it should. at the end the dragons are regular models... there's nothing fancy there :)
     
  50. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    365
    Thanks for your reply matey,

    I don’t think I need to worry about UV’s because substance painter allows me to paint directly onto the 3D model which is also directly onto the texture.
    I can paint masks onto the 3D model too which are like a sort of UV ish. .

    Perhaps I asked a stupid question..

    Also I got Surforge (I used to by almost everything in the good ol 24 hour sales)
    So between that and Substance and composite map I should be able to colour in a little dragon.

    eeek.
     
    Malbers likes this.