Search Unity

Malbers Animals-Creatures

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

  1. Kiba03

    Kiba03

    Joined:
    Jan 27, 2020
    Posts:
    1
    Hi! I got your complete animal forest pack a while back and it's awesome.

    However, I'd like to use a nice wolf made by GIM studios with your Animal Controller for my more realistic setting.

    How easy is it to add states? There are lots of transition animations and even procedural look animations. For example; after idle for some time, transition to sitting. Transition from standing to 4 different walk speeds, etc.

    I'm relatively new to Unity so maybe this doesn't make much sense.

    Thanks.
     
    Malbers likes this.
  2. ByteC

    ByteC

    Joined:
    Jan 10, 2020
    Posts:
    1
    Hey, great animations!

    A quick questions for you about the wolf (or any other animals).

    1) Are there any way to get non aggressive interaction animation? Even if it is from a different source, like mixamo (but for non humanoid). I am trying to build something that allows a character to pet the wolf and have the wolf response similar to how a dog would.
    2) If there is not such a thing, do you have a recommendation how I should go and animate them other than by hand bone by bone.

    Thanks!
     
  3. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Howdy!

    I have one more question. Is it possible to specify a second action button? I have the action "Eat", if I don't want to eat the food myself, but put it into my inventory.

    Would it be possible to say "key-E" eat, but "key-R", put it into the inventory?
     
  4. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    You can take a look to this tutorials :)


    Sadly there's no animations for that at the moment... when I get to the realistic wolf in the next few months I'll add those to the poly art wolf too :)

    You can use the UMotion Asset to animate inside Unity ... is quite powerful!
    You mean when you get for example to an eat zone you want another key to "store the eat zone" ?
    If that is the case .. you need write some script for that :D since there's no logic done to your request.

    You can use the bool Property animal.IsOnZone to know if your animal is on a zone .
     
    Kojote likes this.
  5. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Thanks for answering. I have now tried to read the script "Zone" to understand how the actions are triggered.

    The action for the animal is, if I understood it correctly, started by the method "ActivateModeZone".

    This method is again started by "ActivateZone".

    And this method is started by "TargetArrived" or "Interact".

    What I do not understand now is the input of the key "E". Key "E" is stored in the script "Malbers Input". How does the script now know that the key "E" executes an action. How do the commands get from "Malbers Input" to "Zone"?

    More simply asked, how can I ask from an external script whether a particular key in Malber's Input was pressed?

    ---------------------------------------------------------

    One more question. Is there a way to block certain actions?

    With animal.Mode_Enable(1); you can disable fighting. I'd also like to have a command where I can block digging and eating, for example. Is there already a command for that?
     
    Last edited: Feb 5, 2020
  6. rbrodt

    rbrodt

    Joined:
    Aug 4, 2017
    Posts:
    4
    [SOLVED]

    Hello Malbers!

    Just purchased your Horse Animset Pro package - good stuff! I'm kind of new to Unity and I'm trying to figure out how to hook up a VR headset controller to the animal input system. I tried to follow along with the tutorials and the documentation you have on your website but couldn't find anything that uses the "Input" (instead of "Key") type. I got as far as being able to change State from Idle to Locomotion, but can't get beyond that. I can't figure out how to set the speed (Walk, Trot, Gallop etc.)

    Please see my post here:
    https://forum.unity.com/threads/malbers-horse-animset-pro-v-4-06.820368/
     
    Last edited: Feb 5, 2020
    Malbers likes this.
  7. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hi there!!!

    For Any Zone that is Automatic or Stance/State type...when the Animal Enters the Zone colliders ... the Zone logic will be executed .

    But

    Now when an animal enters a Mode type Zone and is NOT Automatic.... The Zone will search on the Animal the Mode asked for the Zone:
    upload_2020-2-6_11-2-3.png
    E:g If the Zone is an Action Zone (Mode ID = 4) then it will subscribe to the Animal Mode .. on the On Enter Mode Event:
    Here:
    upload_2020-2-6_11-3-27.png
    which on the Inspector is this Event:
    upload_2020-2-6_11-4-20.png

    and if the animal exit the zone it will UnRegister to that event... since is no longer inside the Zone..
    (This is only used to Apply modifications to the zones once the Animation of the Mode plays...)
    Eg: When Starts the Eat Animations then we modify the Stats increasing the Health Stat

    What the Zone Does, is Simply change the Active Index on the Mode as you can see here:
    https://imgur.com/a/div9IK5

    So the Input is still managed by the Animal... the Zone only changes the Active ID for the Mode



    Hope this help

    Cheers
    Malbers
     
    Last edited: Feb 6, 2020
    Kojote likes this.
  8. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    I'm glad you solve it!!

    Actually here I'm working on the new documentation everyday so it may help you better ;)

    https://malbersanimations.gitbook.io/animal-controller/
     
  9. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Very interesting! :)

    Is data from the object that reads the action already transferred to MAnimal?
     
  10. RebelSpartan

    RebelSpartan

    Joined:
    Jul 13, 2019
    Posts:
    3
    Hy i am using you poly art tiger package All control working fine but problem is in jump function. In normal case jump work fine but when i jump from different objects like cube rocks (layer mask of rocks and cube is Ground layer already ) its show lots of error Like This

    "Infinity or NaN floating point numbers appear when calculating the transform matrix for a Collider"
    and go out of environment also

    i am using unity 2018.4 also i attach video kindly have a look to it

     
  11. osire09

    osire09

    Joined:
    Apr 23, 2018
    Posts:
    2
    hi, I ran in some problems with the effect manager.
     

    Attached Files:

  12. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    That is an error with the editor..I'm uploading the fix on the next update
    meanwhile here's the fix:
     

    Attached Files:

  13. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Thanks so much for reporting this...
    Actually I'm trying to reproduce the error with no luck :(

    Can you share with me a lite project with your setting (and a scene where I can reproduce that error easily(
    you can send it here : malbers.shark87@gmail.com
     
  14. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Hi Malbers, I am using brain component to I let a wolf track and attack a rabbit, I have three questions.

    1.How do I modify the 'Stopping Distance' of the 'M Animal AI Control' component? No matter how much I change it, it will become 0.23 the moment the wolf finds the rabbit.

    2.When the wolf finds the rabbit, it will play the walking animation instead of the running animation. How to make it run to the rabbit?

    3.When the wolf approaches the rabbit, its head will constantly shake left and right. How to solve this problem?
     
  15. Sandaga

    Sandaga

    Joined:
    Jan 18, 2016
    Posts:
    3
    Hi Malbers!

    I tried AC Tutorial 1 & 2. May be bug from Unity2019.3.1f1.
    Display of MAnimal script is strange and Speed> Ground> Walk property doesn't open.
    No problem in Unity2019.2.9f1.

    Thanks.

    Unity2019.3.1f1.jpg
     
    Last edited: Feb 20, 2020
  16. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Hi!

    Sorry, I found another bug. Controler and Cougar Asset are up to date. Once the Cougar has crawled, other triggers like to teleport back:



    One more question, I can use action calls to make the cougar lie down, sit and sleep. If I want to go from sitting to sleeping, is there a command for that or does he always have to get up first?
     
    Malbers likes this.
  17. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    That is because the Rabbit is the target, and it has a Stopping distance of 0.23... :) you can increase the stopping distance on the rabbit.
    The Animal Ai Control has a Walking Radius... Set it to zero and it should keep running instead :)
    upload_2020-2-20_21-50-55.png

    Disable completely the Look At Component
    upload_2020-2-20_21-51-52.png
     
  18. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hi there!
    Yes that is an old bug:)

    In you animator you should have on the Crawl Action IsKinematic Behaviour ... instead the Old Animal Modifier behaviour..

    With this values:
    upload_2020-2-20_21-54-16.png

    takea look to this post:
    https://forum.unity.com/threads/malbers-animals.440812/page-21#post-5430075
     
    Kojote likes this.
  19. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Sadly at the moment no... I want to add on the next update with the new Golems ... a new feature that you can go from an ability to another ... just like from Lie... to seat.
     
  20. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    2. I changed ‘Walking Radius’ to 0 but it didn't work, the wolf still played the walking animation.

    3. I tried to disable or delete ‘Look At Component’, but it did n’t work. The strange thing is that the wolf wo n’t shake when it approaches the player, it only shakes when it approaches the AI.
     
  21. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    can you share with me a just a clean scene with your configuration of the wolf and the rabbit to take a closer look to the problem :)

    You can send it to my mail malbers.shark87@gmail.com
     
  22. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @Malbers, I'm looking to add a pickup functionality to my animal and wondered if you had any tips to keep it inline with your methods?
     
  23. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Actually I'm working on adding that functionality for the next update so stay tuned :)
     
    Kojote and AndyNeoman like this.
  24. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    I used the DEMO scene, not an empty scene. This problem is very easy to reproduce.

    Here are the steps:

    1. Create a new project using 'Unity 2019.3.f6' and import the 'Animal Controller' asset and the 'Poly Art Animals Forest Set' asset.

    2. Unzip the ‘01 Forest Pack AC 3.02.rar ’file and open the‘ 0-Rabbit Forest ’demo scene.

    3. Put a "Wolf AI Enemy.prefab" in front of the rabbit, adjust the "Walk Distance" to 0, run the game, and you will find that the wolf plays a walking animation instead of a running animation.
    --------------------------------------------------------------------------
    4. Find the 'Look for Player.asset' file, change the 'Look For' option from 'Animal Player' to 'Tags', and set the Tag to 'Animal (Tag)'. Place a "Rabbit PA AI.prefab" in front of the wolf and add a "Tags.cs" component to it. Also set the Tags to "Animal (Tag)". Run the game and you will see that the wolf shakes his head as he approaches the rabbit.
     
  25. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I have 3 build errors.

    "Assets/Malber'sAnimations/common/scripts/Utility/SerializedPropertyExtensionscs (11,53) (31,57) and (59,58) error CS0246: the type or namespace name 'Serialized Property' could not be found. Are you missing an assembly reference?"

    I use 2018.4

    Please help.
     
    Malbers likes this.
  26. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Immense!
     
  27. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hi there my friend

    Can you tell me on with platform did you build... so I can reproduce the Issue?
     
  28. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    here's a quick preview :)

    You can use it with or without animations :D
     
    Last edited: Feb 27, 2020
    Kojote, AndyNeoman and Rowlan like this.
  29. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Amazing! I presume you can put the mount points where you like? My use case is a Gorilla who can pickup and carry two items, one in either hand. I can't wait to get my hands on this.
     
  30. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Windows PC
     
  31. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Replace this script :)
     

    Attached Files:

  32. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Thank you, but I don't have mgamesettings.cs in my project. The offending script appears to be "SerializedPropertyExtensions.cs"
     
  33. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Hi Malbers!

    I'm building a vitality system for my Cougar.

    In Malbers input, the following methods are used to control speed:

    SpeedDown
    SpeedUp
    Sprint

    I wanted to add a condition that if the character is too weak, no more speed up is possible.

    Speed 1 - Vitality < 30%
    Speed 2 - Vitality 30 - 50 %
    Speed 3 - Vitality 50 - 80
    Run Sprint - Vitality > 80%

    The problem now is how I control this. If it's less than 80%. He can still do Down and Up between Speed 1 and 2. I would have to query somehow, which speed he has at the moment and if ++ or -- are possible. Is there a property for this or can I read out the speed otherwise?
     
    Last edited: Feb 28, 2020
    Malbers likes this.
  34. pascalenos

    pascalenos

    Joined:
    Mar 28, 2019
    Posts:
    10
    Hi Malbers, good afternoon. My name is Homero Aguilar, I am writing for the following situation: I have been testing your products, and especially the HAP, I have had some problems, in the HAP AI sample scenario, I have problems when disassembling the character, since this it cannot be reassembled and it cannot use the weapons again, what can I do or where should I read, since I have not found any reference in the manual or in the tutorials. Similarly with the artificial intelligence that your controller has Animals, I have some doubts: Can it be used to create companions, for the player? Does intelligence only allow creatures to be enemies of the player? Do you have an example in a video tutorial that allows you to see the establishment of an animal that lurks and hunts other animals (other than the player) and has a certain routine (hunt-eat, sleep, drink water, etc.)? Thank you in advance for your attention and help.
     
  35. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Oh it seems you have an old version then...
    let me send you the current updated version for that script.
    Also Also it has to be on the Editor folder
     

    Attached Files:

  36. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558

    So Here's what you can do :)
    You can Restrict the Speeds by using the Top Index on the speeds... that allows to set the Maximum Speed Index that the Speed Set can use.

    So you can create your custom script and access this property

    Animal.speedSets

    So


    Code (CSharp):
    1.  
    2. if (myhealth < 30)
    3. {
    4. MSpeedSet GroundSpeed =   myAnimal.speedSets.Find(speed => speed.name == "Ground");
    5.           GroundSpeed.TopIndex = 1;
    6. }
    That will restrict the Speed to the 1st index (Walk) when Top is = 1..
    and so on


    upload_2020-2-29_15-14-31.png

    You can make this easier If you are using the animal as your main player and Use the Top Index as an Int Var..
    upload_2020-2-29_15-22-12.png

    and that way you can have access anywhere on any script by just using that scriptable object

    ...

    Hope this helps
     
    Kojote likes this.
  37. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    You mean dismounting the horse and then mounting it again ??
    I'll take a look to the AI Scene to solve the issues :) thanks for reporting this.

    Actually you can take an use of the Tag scriptable object and Tags Component:

    And make an AI Brain Animal to Attack/Follow any object with that tag with a Look Decision: Example
    upload_2020-2-29_21-43-54.png

    And on the "Dangerous Dragon" add the Tags component with the same tag:
    upload_2020-2-29_21-45-21.png

    So if you AI Dragon Finds any object with that Tag.. it will fulfill the decision and the you can make a new AI State with some Task like Attack..

    You can take a look to the AI Brain Tutorial for more information:


    Now for the Thirst, Sleep, Eat ...etc; I don't have any direct tutorial on how to do it ... but you can use the Stats Component and the CheckStats Decision.
    upload_2020-2-29_21-50-29.png

    For example you can set on the Stats component that Hunger and Thirst are Stats and they Degenerate overtime..
    And on the Check State Decision if the Thirst is lower than 13 then create a new AI State that searches for a Drink Zone that increase the Thirst State to higher value..

    Hope this helps



    I'm trying to finish first the Golem which is the new asset I have almost done to then continue working on new tutorials
     
    Rowlan likes this.
  38. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    That's awesome!
     
    Malbers likes this.
  39. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Hi Malbers!

    The thing with the simplified version via VarInt, works well. I've now written it like this:

    public IntVar maxSpeed;

    #region Vitaility Speed Speed
    private void VitailitySpeedUpdate() {
    if (currentVitality <= 30) {
    maxSpeed.Value = 1;
    } else if (currentVitality > 30 && currentVitality <= 60) {
    maxSpeed.Value = 2;
    } else if (currentVitality > 60) {
    maxSpeed.Value = 3;
    }
    }
    #endregion

    If I now use Speed++ and Speed-- and the vitality is too low, I can't use higher speed.

    But the problem is the current speed. As long as I don't use the keys Speed++ and Speed--, I can also use max speed at 0% vitality. So I would need another starting point to reduce the current speed.
     
  40. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    @Malbers I substance painted your crow for a quick test. It works quite nice as a Parrot imo. It would be super awesome if you could add Parrot textures and prefabs and sounds to this asset :) Here's proof of concept:

    raven 1.jpg
    raven 2.jpg

    Or animated:

     
    Last edited: Mar 5, 2020
    Malbers likes this.
  41. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    That is just Amazing O looove it!
    Most of the Animations will work for the Parrot too... but it will have Unique animations too :)
     
    Rowlan likes this.
  42. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    You need to Update the Current Speed:)

    Just add this line of Code: after you made your changes
    Animal.CurrentSpeedIndex = Animal.CurrentSpeedIndex;

    This will update the Current Speed with the new Max value


    Cheers!
     
    Kojote likes this.
  43. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hi Guys!!

    After the Golems which are almost done!!

    Here are the animals I have on the queue (With poly Art version Included too)
    Elephant_Render_02.JPG Elephant_Render_03.JPG
    Rhino2.jpg Rhino.jpg


    I know the Forest animals are yet to be done with the realistic version by my guy is a bit scared with the hair for the wolf, bear, etc...so these ones are first :D
     
    Last edited: Mar 6, 2020
    ftejada and Rowlan like this.
  44. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Very nice animals! Will there be more savannah animals and when is the release planned? ^^
     
  45. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    There seems to be an issue with the FreeLookCameraRig. If I have 3 of your animals (e. g. 3 crows) and assign the player animal to the Target of the FreeLookCameraRig, then during play mode the camera is on another animal instead of the one I assigned. I guess it's because of the "Camera Target" in the animal gameobject. I disabled it for now, but it would be preferred to have the camera on the one I explicitly chose.
     
  46. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Sorry, I have to check back. It's still not really working. I made a video on it once.

    I use this method:

    Code (CSharp):
    1.         #region Vitaility Speed Speed
    2.         private void VitailitySpeedUpdate() {
    3.             if (currentVitality <= 30) {
    4.                 maxSpeed.Value = 1;
    5.             } else if (currentVitality > 30 && currentVitality <= 60) {
    6.                 maxSpeed.Value = 2;
    7.             } else if (currentVitality > 60) {
    8.                 maxSpeed.Value = 3;
    9.             }
    10.             LD_SP_Player_Controler.Instance.animal.CurrentSpeedIndex = LD_SP_Player_Controler.Instance.animal.CurrentSpeedIndex;
    11.         }
    12.         #endregion
    It's called every X amount of time when I call up the automatic vitality reduction.

    And here's the video:



    (Sorry for the poor quality of the video. In the direct link of the video, there is a better quality than here in the forum.)

    As you can see, I have, as you showed me, stored a variable in Top Index. He runs normally at first. Then I activate the automatic reduction. Although you can see in the upper left corner that the vitality decreases and the script is active, the Speed Sets Run is still active.

    Do you have any idea what else is wrong here?
     
    Malbers likes this.
  47. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    Something seems to be off with the compiled version of an animal. Found another thing that works in edit & play mode, but not when it's compiled.

    I use Follow Target on the Ravens. However when the followers are on the ground, I have to make them fly when my Raven flies. So I created this simple script:

    Code (CSharp):
    1. public class MalbersKeyHandler : MonoBehaviour {
    2.  
    3.     [System.Serializable]
    4.     public struct KeyStateMap
    5.     {
    6.         public string key;
    7.         public string state;
    8.     }
    9.  
    10.     public KeyStateMap[] keyStateMap;
    11.  
    12.     private MAnimal animal;
    13.  
    14.     void Start()
    15.     {
    16.         animal = GetComponentInParent<MAnimal>();
    17.     }
    18.  
    19.     void Update()
    20.     {
    21.         if (Input.anyKeyDown)
    22.         {
    23.             foreach(KeyStateMap map in keyStateMap) {
    24.                 if(map.key == Input.inputString)
    25.                 {
    26.                     // find state
    27.                     StateID ID = MalbersTools.GetInstance<StateID>( map.state);
    28.  
    29.                     // activate state
    30.                     animal.State_TryActivate(ID);
    31.                 }
    32.             }
    33.         }
    34.     }
    35. }
    Basically in the inspector you assign it a key (e. g. 'u') and an id (e. g. 'Fly'). So when you press u, the raven should transition to the fly state. It does so in edit & play mode, but not in the compiled game.

    Any idea how to fix this?
     
  48. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    I had to try with the Follow Target script. Also @Malbers your Elephant and Rhino would have fit perfect, can't wait to get my hands on them :D

     
    Malbers likes this.
  49. SpyrosUn

    SpyrosUn

    Joined:
    Nov 20, 2016
    Posts:
    144
    Hi, the animal controller looks really nice ! I had a couple of questions :

    1) I am assuming this can be used on NPC animals too right ? It would be possible to use it on a game where the main player is a human and there are animals around, correct ? Pretty sure that's the case, but just wanted to verify.

    2) Would you say this can be used for animal like fantasy creatures too ? Let's see bears walking on two feet or 4 feet robots. I am interested to see if this can be adjust to work with those, again seems like it would, but wanted to verify.

    Thanks ! :D
     
  50. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Right After the Gollems :)
    Yes there will be 10 animals in total..
    next will a crocodile after the rhino.

    Yeap that is because the Unity Event Raiser Component in each Animal with the Camera Target
    is just a quick way to auto assign the camera to an animal.

    Just disable on the animals you don't want to be the camera Target:
    upload_2020-3-7_12-41-33.png
     
    Kojote and Rowlan like this.