Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Malbers Animals

Discussion in 'Assets and Asset Store' started by Malbers, Nov 12, 2016.

  1. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    276
    I mean really, your system has damage, health and animations, sounds and effects. Really the AI system would just be AI direction. And patterns, such as flocking, flanking, stalking. Cover.
     
  2. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Yeap but the main purpose of the Animal controller is to use it with other animals , not only mines :)
     
  3. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Yes... Actually I want to add at least some basic AI behaviours ... using this the Tanks tutorials ... just some simple AI chase, attack, patrol, flee behaviours ... at least for starting :)
     
  4. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    276
    After using yours, i dont wanna use others haha.

    I look forward to the AI concept though.
     
    Malbers likes this.
  5. ryand_unity

    ryand_unity

    Joined:
    Jul 6, 2018
    Posts:
    1
    Hi, I bought both the Forrest pack and the ravens and crows. I was able to get the my own custom models (Deer and Rabbits) working and running around using your youtube tutorial. It works great! However, now I'm trying to do the exact same thing for the bird system. I have my own model and am following the exact same technique, but for the life of me I cannot get my bird to animate with your bird Ai. I can see my bird is set up correctly when I apply him to your bird animations in the unity preview/inspector window - so far so good. But, when I add my bird to the "Raven Poly Art AI" group, then reassign my new avatar to the Animator and hit play, my bird just moves around the path the Ai bird is taking , but is completely static...no animation. I've tried many things, can you make a suggestion to troubleshoot??
     
    RogDolos and Malbers like this.
  6. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Can you make a video of the issue?


    Usually when the model stays static is due to the avatar been missing or incorrect.
    The second cause is that the Hierarchy does not match.. and if is stays static then it can be one of the higher parent ..

    but if you can see your model in the animations preview then that is a new new problem...

    if you make the video please show me the animator too ... so i can see which state is playing also...

    and as a last resource you can send me via email your converted model to explore it myself to see if I can find what is missing
     
  7. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    870
    I don't suppose anyone has a simple pickup/drop working with the animal controller? I'm moving over from a different controller and just trying to save a little time :). Working through adding my character now this is a very nice looking controller so far.
     
  8. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    870
    Hi all, Am I missing something or is there no tutorial for using the animal controller with your own animal models/animations? I've seen the tutorials for the rider but my project has the animal as the player, not a rider.
     
  9. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    I'm finishing migrating all the animals to the new controller 1 left to go :)
    so then I can start making tutorials on how to use it for any character.
     
    AndyNeoman and mandisaw like this.
  10. mandisaw

    mandisaw

    Joined:
    Jan 4, 2018
    Posts:
    23
    I think we're getting a documentation update after Malbers finishes all the animal updates. But you can check out the Manual for the old version of the controller, and then ask follow-up questions here.

    There's a Google Doc linked from the Asset Store page, and I think there was a YouTube video on setting up other animals. [Edit: Yup, Re-targeting Animations -
    ]
     
    AndyNeoman likes this.
  11. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    870
    That's not really what I need unfortunately. I have my own animal and it's own animations I'm not trying to re-target any other animals animations. It's more about setting up the controller with my own model/animations and adding pickup functionality.
     
  12. mandisaw

    mandisaw

    Joined:
    Jan 4, 2018
    Posts:
    23
    Ah, got it. For one of my current projects, I'm using the new Controller for humanoid (player & NPC) and non-Malbers animal (NPC) characters. Reading the old/existing manual, plus examining a couple of the Demo scenes, plus just poking around the new/updated components in the Inspector was enough to get the humans setup with basic locomotion, pathfinding/navigation, and a Random-Idle behavior.

    For me the main thing that needed some adjustment was getting the pivot(s) set up properly. For bipeds/humanoids that was just Hip, but I think for quadripeds you need Hip & Chest. Then I had to create a new/copied Animation Controller with my animations plugged-in, my blend-tree values, my Idle variants, etc. Still working out how Specials/Actions work, but the basic stuff was laid out fairly well even in the old manual.

    Maybe pick one of the Demo scenes that best matches how your game is supposed to work, and see how it is setup? That helped me get my Player-input issues sorted out.
     
    AndyNeoman likes this.
  13. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    870

    Thanks for that, i'll dig into the demo scenes and see if I can hack it together with my animal/animations until the updated tutorials are available.
     
    mandisaw likes this.
  14. raptorbastard

    raptorbastard

    Joined:
    Jan 31, 2019
    Posts:
    3
    Trying to import a tiger using this controller, not having much luck, can someone guide me on this I want to use my own animations too.
     
  15. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    I'm just working on new tutorials :) thanksfully I just finished working on the migration As soon as they are available I will post it on the forums ... until then I appreciate your patience
     
    magique and mandisaw like this.
  16. Andr3w

    Andr3w

    Joined:
    May 24, 2012
    Posts:
    14
    I found a problem with the controller. At least I have it. When I pressed jump button(Space) and then pressed attack button, the character will lunch high in to the air. And when I keep clicking attack button, character is going even higher. Similar thing happens in the water after pressing jump button.
    Seems like two interactions are colliding or maybe Im missing some settings that need to be adjusted.
     
    Malbers likes this.
  17. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    That's great to hear... I mean that you got that bug.... I'l try to reproduce it on my side...

    BTW which animal did you use ... which unity... which sample scene...

    and if is not too much to ask... can you make a video to see the bug better?
     
  18. Andr3w

    Andr3w

    Joined:
    May 24, 2012
    Posts:
    14
    Im using default blue wolf character in forest scene(0 - Forest.unity). Unity version is 2018.4.4f1 (64-bit).

    Videos:

     
    Malbers likes this.
  19. markcaz

    markcaz

    Joined:
    Apr 7, 2019
    Posts:
    3
    Hi,
    Great animals!
    I purchased the Tiger, installed the latest, and it looks like .SetAction() takes an Action type, not a number anymore.
    I have a running game, so I don't use the regular input. I need to be able to do this in code: run, set speed, stop and jump.
    Thanks!
     
    Last edited: Oct 31, 2019
  20. derbytau

    derbytau

    Joined:
    Oct 3, 2019
    Posts:
    4
    Hi,

    @Andr3w @Malbers
    I think I found the reason why this is happening:
    Maybe I am wrong but, In the OnStateMove Method of the Jump State the AdditivePosition is increasing as long as the animal is in the jump state. But the attack Action is interrupting the the state with ongoing transitions so it does not reach the TryExitState check.

    As a quick check for my theory I added some conditions to the OnStateMove Method so that the State can not stay longer than 2 Seconds (the jumpDuration is a new member property of the jump Class):

    Code (CSharp):
    1.  
    2. jumpDuration += deltaTime;
    3.  
    4. if (jumpDuration > 2f)
    5. {
    6.     jumpDuration = 0f;
    7.     ExitState();
    8. }

    This is by no means a good workaround and was just a test to detect the problem.
    And it is still jumping far to high but i could stop it from jumping forever :D
    I hope this can help troubleshooting the problem and finding a good solution to the problem
     
    Last edited: Oct 31, 2019
    Malbers likes this.
  21. derbytau

    derbytau

    Joined:
    Oct 3, 2019
    Posts:
    4
    and hello again,

    the real reason why I looked at this thread was because I wanted to ask If you could provide an example of the animator for the Stances in the Animal Controller.

    The concept seems really great.

    We are trying to use the controller for a humanoid character but I am not sure if the stances are designed to be separate layers of the animator, additional substate machines for each state of the states or they should be inside a State for example as an alternative to the default Locomotion blend tree.

    I hope I'm talking not too confusing.
    Thats a problem I have even in my first language

    I would be very grateful if you could help me

    greetings
    derbytau
     
  22. PunkPuffin

    PunkPuffin

    Joined:
    Jun 17, 2018
    Posts:
    6
    Hi @Malbers

    Will there be an update to the Animal Controller or its integration with your assets. I've been testing the Mobile Demo that is in the Tiger Dragon asset and there are a number of issues with it. For example some of the Animations on the trigger locations don't work. When flying or swimming the up/down seems to go all weird depending on where the camera moves to.

    Thanks
     
  23. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Thanks for this report !! I have fixed the issues and I've add some new goodies...

    Now on the States you can add if the state can go to sleep if the animal is doing a mode .. Example (Jump State can go to sleep if the animal is doing an action or an attack)
    upload_2019-10-31_23-50-42.png

    I'll have upload the Update (with some other small fixes too )... so it should be out tomorrow ...
     
    Last edited: Nov 1, 2019
  24. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Hi there!
    I have added the SetAction Version with the an Int Value for the new update


    To Set an Speed you can Call:
    Manimal.SpeedDown() to Speed Down
    Manimal.SpeedUp() to Speed Up
    Manimal.SetSpeed(int Val) to set an specific speed value...

    Now the Animals have speed sets... for the states
    For example (Locomotion and Idle) use the Ground Speed Set..
    upload_2019-11-1_0-0-14.png

    If you want to start with the Animal Running you set the Start Index to 3.. since Run is the 3rd Speed

    If you want to activate Run Speed via Code... you just use Manimal.SetSpeed(3)

    To Move, the Animal uses Animal.Move(Vector Direction)...
    you just need to give him a vector direction to move... just like the old controller ...
    and to stop you can use Animal.StopMoving() animal.ResetMovement() or Animal.Move(Vector3.zero)

    To Jump or Activate any other State you use

    animal.State_Activate(int StateID)..

    the ID for Jump is 2

    so animal.State_Activate(2);

    Hope this helps
     
    mandisaw likes this.
  25. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Thanks anyway for this!
    I have created the fix and is uploaded YAY
     
  26. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Hi there!
    The controller is till on beta that is why I love you guys catching some bugs here and there....

    This part I got a bit lost:
    can you elaborate a bit more?

    Yes... that is because there's a new Y axis comes to play to move the Animal...
    That can be disabled here:
    upload_2019-11-1_0-13-32.png
     
  27. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    172
    Hi Malbers. The ‘Zone Enter Hole’ prefab was not found in the ‘Rabbit Forest’ Demo and project folders.
     
    Malbers likes this.
  28. kabinho728

    kabinho728

    Joined:
    Jun 30, 2016
    Posts:
    6
    Hey, does the $143 group animal pack come with environments as well? Or just the animal models?
     
  29. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Thanks for the report ,I've added it to the AC Update 1.06b
    But here it is while you wait:


    It comes with one Environment...this one:
    upload_2019-11-1_18-42-41.png
    The other ones on the videos are free assets from the store
     

    Attached Files:

  30. PretzelTail101

    PretzelTail101

    Joined:
    Apr 16, 2018
    Posts:
    13
    You are a true 3d artist, animator, and programmer this is absolutely insane... TEACH ME YOUR WAYS!!!
     
    Malbers likes this.
  31. markcaz

    markcaz

    Joined:
    Apr 7, 2019
    Posts:
    3
    Thanks for answering my last questions - all fixed!

    How do I get the tiger to stop on an exact spot? I have a runner game where the animal may need to suddenly stop. It seems like the tiger's inertia pushes him forward.
     
    Last edited: Nov 4, 2019
  32. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    10 years of experience :) and a lot of youtube tutorials!
     
    mandisaw likes this.
  33. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    on The AI there's a Stop Radius... smaller the radius acurate the point where the animals will stop...
    now
    To remove the Inertia you can Set to zero/ or Set it to a very high value the Animator Lerp parameter on the speeds
    upload_2019-11-4_14-45-31.png
     
  34. markcaz

    markcaz

    Joined:
    Apr 7, 2019
    Posts:
    3
  35. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
  36. derbytau

    derbytau

    Joined:
    Oct 3, 2019
    Posts:
    4
    Hi Malbers,

    I think the last update of the animal controller in the asset store is messed up.
    Its size is 0 bytes.
     
    Malbers likes this.
  37. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Yeah It seems on the last update Unity really didn't got the Package... I've already uploaded it again... it should be live again soon
    meanwhile here's the package:
    https://drive.google.com/open?id=1RZBZJ4OUPDEz2ZaCKarrxNDx3A7RcKcg
     
  38. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    222
    Hi, 2019.2.11 Everything is pink. How to fix?
     
    Last edited: Nov 6, 2019
  39. derbytau

    derbytau

    Joined:
    Oct 3, 2019
    Posts:
    4
    thank you for your quick help
    works fine with the data from your drive :D
     
  40. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Did you use HDRP or LDRP???
     
  41. sadicus

    sadicus

    Joined:
    Jan 28, 2012
    Posts:
    222
    hi, 2019.2.11 LWRP Template
    after updating materials there is still pink.
    Also where is the "Input Manager"? "UpDown" says it's been created, but not finding the window.
     
    Last edited: Nov 6, 2019
  42. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    For the Up Down Input Just select any of the Prefab and On the Malbers Input Script ... Hit Create on the UpDown Axis

    for the materials you just need to download the LWRPL version of the Custom 4x4 Color Shaders:
    Here:
    https://drive.google.com/open?id=1Dp73agajKhzc3sTlE5fWoLJfjROYnUoz
     
  43. Andr3w

    Andr3w

    Joined:
    May 24, 2012
    Posts:
    14
    Thanks for the fix I mentioned before. I did found another problem. Perhaps its because of this fix.

    Like before Im using the same setup. Wolf and forest.

    When I press Space to jump and then immediately after I press and hold Space, wolf keeps jumping in the same plane position. See video below:
     
    Malbers likes this.
  44. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Nice catch!!

    this value was missing on the Jump State... Add to the Sleep From State List the Fall ID.. that way when the wolf is on Fall it wont try to jump again
    upload_2019-11-10_15-46-45.png
     
  45. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    648
    My Stag frequently gets stuck like this, and does not return to right side up. Tipped Deer.PNG

    Tipped Deer.PNG
     
  46. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Hey @wood333

    In order to help you I need a bit more information ;)

    Which unity are you using.. which version of the Animal Controller ...
    also also ... that Stag is AI Controlled or Player Controlled..

    and most important can you make a video to see the issue so I can try to reproduce it?

    Cheers!
     
  47. gerritha

    gerritha

    Joined:
    Nov 13, 2019
    Posts:
    1
    Hi Malbers!

    I am using your Elemental Dragon with the AnimalController.
    In your documentation (at google docs) its says that there is a "OnFly"-Event as well as a public method "SetFly". Right now i cant seem to find any of them.

    Do you have a clue why? Might be the case that im doing something wrong here (im very new to Unity).

    Greetings
    Gerrit
     
  48. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    I'm updating the Documentation everyday, since that methods belong to the old Animal conrtoller

    Now to activate any state (Locomotion, Fly, Jump, Swim, death .. etc) you need to call

    animal.State_Activate(int ID) ....
    upload_2019-11-13_21-26-8.png
    been the ID the int value for each state.. you can find all the ID values here:
    upload_2019-11-13_21-25-19.png
     
  49. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    172
    Hi Malbers, I have three questions.

    1. Is there an event when the animal is attacked? Or is there a function to find out if the animal is bleeding?
    2. Is there a function for AI to quickly set the player as the attack target?
    3. Is there an escape function for AI?

    I like the new controller, it works great.
     
  50. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,582
    Hi there!!
    When an animal is being attacked the Health stat changes... so you can listen to the health Stat event on Value changed:
    This one:
    upload_2019-11-15_14-26-23.png

    In the code, is called by finding first the Health item on the Stat list.. and listening to the Event: OnValueChange
    upload_2019-11-15_14-28-10.png

    Remember if the Stat changes (Higher or Lower) the Event is Invoked... This can be used for heal the animal too besides hurting it.

    No, there is not.. The AI Animal Control component is just for moving the character using navmesh Input..

    But I'm working on a new "Brain" component to create basic behaviours for the animals...
    I'm using the thanks AI tutorials as a base:

    (20% done)

    Escape you mean as Flee??
    This can be one of the behaviours for the Brain component
     
    rrahim and nirvanajie like this.