Search Unity

Malbers Animals-Creatures

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

  1. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hey there! thanks your support!
    Try this video:
    https://malbersanimations.gitbook.i...art/guide-to-use-malbers-unity-assets-with-ac
    Try it on an empty project.
     
  2. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Maybe this video can help you:

    (You just need to add Rotation value to the Speeds)
     
  3. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    You need to connect manually the Sprint Input to the Animal Sprint:
    upload_2020-10-24_11-19-9.png
    upload_2020-10-24_11-19-23.png
     
    RemusRain likes this.
  4. tahir_ali

    tahir_ali

    Joined:
    Jan 6, 2018
    Posts:
    119
    It will be great if you add water physics (Buoyancy). Here is link you want some help although you are great developer.
     
    Malbers likes this.
  5. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,269
    Just a few more outside shots before I try the Dungeons :D

    lf8.jpg
    lf5.jpg
    lf6.jpg
    lf7.jpg
     
  6. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Rowlan likes this.
  7. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,269
    Someone imprisoned the Little Dragon :(

    ld 1.jpg
    ld 2.jpg
    ld 8.jpg
     
  8. mandisaw

    mandisaw

    Joined:
    Jan 4, 2018
    Posts:
    82
    @Malbers Just a quick addition to the v1.2 upgrade documentation. I saw the note to add the StateFloat AnimatorController parameter, but I had to dig back into the code/source control to find that IDInt became ModeStatus, and IDFloat became ModePower. Not sure if that was noted someplace previously.
     
    Malbers likes this.
  9. Harald_Heide

    Harald_Heide

    Joined:
    Jul 22, 2015
    Posts:
    81
    Really likes your approach towards making a total autonomous animal forest environment. Would love to see even more examples on this. With automatic behaviours like sleep, eat drink flee attack, etz... Best animal simulator I've seen
    and easier to grasp than Opsive Behaviour trees me thinks
     
    ProceduralCatMaker and Malbers like this.
  10. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    I've been away for a year or so and diving back in to dev. Any upcoming animal packages you're willing to share? Are you taking suggestions? (hint: buffalos/cows/yaks/wildebeests).
     
    Malbers likes this.
  11. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hey there!
    Yes! I changed the name convention of those Animator Parameters to have them more close to what they actually do
    FloatID is now StateFloat (Which is only used for the States)
    IntID is now ModeStatus (Which is only used for the Modes)
    Height is now ModePower (Which is only used for the Modes, is the Equivalent of StateFloat but for the modes)

    I have added to the Update Part of the Documentation :)
    https://malbersanimations.gitbook.io/animal-controller/quickstart/upgrading-to-ac-1.2-hap-4.2

    These parameters can have any name you want on the Animator Parameters: On the Advanced Tab

    upload_2020-10-27_15-18-46.png
     
    mandisaw likes this.
  12. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Yes making Behaviour Tree work with the Animals would be amazing.. and is on my to do list but for now I'm focusing finish the remaining Integrations I have pending so I can start working on new Asset again :) since I have only released 3 new ones this year.

    The wildebeest is on on my todo list for the Savannah pack ;)

    But for now this ones are the ones that are next on the list:
    https://malbersanimations.gitbook.io/animal-controller/asset-in-production
     
    JohnnyFactor likes this.
  13. mandisaw

    mandisaw

    Joined:
    Jan 4, 2018
    Posts:
    82
    @Malbers I've got a little doggy that follows my Player using a combo of Patrol & Stand AI behaviors (depending on if the Player is within range). It's working perfectly while I'm grounded/on the NavMesh, but once they're in the Swim state (off NavMesh), the AI can't navigate.

    Any advice for extending the AI Brain to work off-NavMesh? The targeting and decision-making seems to still work (correct Target set, knows when the Player is in & out of range), but what part handles the navigation/pathfinding?
     
  14. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    hi @Malbers . I am interested in buying your Elemental Dragon package for Unity. Since I am going to use it for a VR project, I would like to ask you, if this one is VR and URP Ready? Thanks for your time
     
  15. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
  16. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Yes, one of the next things I'm working on is to make the Brain work with Air and Water waypoints which are independent of the Nav mesh..

    One Trick I found to make the animals to work in the water is to bake the Navmesh also in the water... just like they are "Ground"
     
    mandisaw likes this.
  17. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    IMPORTANT NOTE:

    Next HAP and Animal Controller Update will be use Unity 2019.4 LTS

    This is required to make Cinemachine the Default Camera System.
    Adding again Cloth to the Horse Mane and Tail


    Removing old bugs from Upgrading from older version of Unity.
    And many needed features that comes with the latest Unity LTS version.
     
    mandisaw, tahir_ali and Rowlan like this.
  18. tahir_ali

    tahir_ali

    Joined:
    Jan 6, 2018
    Posts:
    119
    Already using Cinemahine camera in my game with your controller. Best Camera controller I ever used.
     
  19. mattxreality

    mattxreality

    Joined:
    Dec 11, 2018
    Posts:
    57
    I am studying the Animal Controller AI section, but most of the content is empty. Is there another location where I can learn how to use the AI features? upload_2020-11-7_13-1-3.png
     
  20. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    hey there yes apologies for that I'm still working on the documentation each day,
    I have updated the AI target section...
     
  21. mattxreality

    mattxreality

    Joined:
    Dec 11, 2018
    Posts:
    57
    Thank you Malbers. I will continue to read the documentation as it becomes available.

    I did have another question for you. I am working on an interactive VR adventure and plan to use the Animal Control, HAP, and Unka extensively. I would like to use the AI system to move animal characters to specific locations, then have their next location triggered by player action. I don't quite know how to do this. I see the MWayPoint script allows pauses at a waypoint, but doesn't stop the animal at the location and wait for player interaction.

    Do you have a recommendation on which AC features I should use to accomplish this? I am trying to:
    1. Use the AC AI system for animal locomotion.
    2. Use waypoints to identify where the animal should go.
    3. Allow player interaction to trigger the animal to perform an action or locomotion (examples: "player tells animal to get off the bed, player moves to a specific location which causes the animal to move to the next waypoint...")

    Thank you for your advice.
     
  22. danteswap

    danteswap

    Joined:
    Oct 27, 2013
    Posts:
    164
    Hi there i need some help Not much , I want my animal to attack other animals automatically i mean player will press attack button just 1 time and animal will attack other animal over and over till that animal dies , i have other ways to implement it but it would be nice if you can suggest a simpler way.
     
  23. mandisaw

    mandisaw

    Joined:
    Jan 4, 2018
    Posts:
    82
    Ah, that's a good idea! Yeah, I have a separate NavMesh for the Animal & Human characters, so I should be able to add the Water layer to the Animal one. Looking forward to the Air/Water waypoints as well :)
     
  24. mattxreality

    mattxreality

    Joined:
    Dec 11, 2018
    Posts:
    57
    @Malbers I don't know if you take requests for new assets, but it would be great to have a collection of various dogs as one of your animal assets. I plan to get the fox assets for now, but would love a variety of domesticated dogs (it looks like there are few options on Unity Asset Store, TurboSquid, SketchFab, and I would trust your assets to work best with AC over trying to match other asset rigs). Thanks for considering my request!
     
  25. mattxreality

    mattxreality

    Joined:
    Dec 11, 2018
    Posts:
    57
    @Malbers I have another question. I would like the animal to face the player when the are near the player. How would you recommend I do that? Is there a way to control that with the AI components?
     
  26. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    After the update I get the following error message when I try to add an item.


    AmbiguousMatchException: Ambiguous match found.
    System.RuntimeType.GetMethodImpl (System.String name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
    System.Type.GetMethod (System.String name) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
    MalbersAnimationsExtensions.InvokeWithParams (UnityEngine.MonoBehaviour sender, System.String method, System.Object args) (at Assets/Malbers Animations/Common/Scripts/Utilities/MalbersAnimationExtensions.cs:147)
    MalbersAnimations.Controller.MPickUp.OnAnimatorBehaviourMessage (System.String message, System.Object value) (at Assets/Malbers Animations/Common/Scripts/Animal Controller/MPickUp.cs:275)
    MalbersAnimations.MessagesBehavior.DeliverListener (MalbersAnimations.MesssageItem m, MalbersAnimations.IAnimatorListener listener) (at Assets/Malbers Animations/Common/Scripts/Behaviors/MessagesBehavior.cs:145)
    MalbersAnimations.MessagesBehavior.OnStateUpdate (UnityEngine.Animator animator, UnityEngine.AnimatorStateInfo stateInfo, System.Int32 layerIndex) (at Assets/Malbers Animations/Common/Scripts/Behaviors/MessagesBehavior.cs:80)

    EDIT:

    Another problem, apparently I have solved the problem. But the item is simply teleported into the mouth. An animation like the wolf is not triggered. Is the animation not there yet or do I have a small error?
     
    Last edited: Nov 9, 2020
  27. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hey Matt
    Thanks for the suggestion.. At the moment the settings where a simple AI Brain when the animal does a secuencial set of tasks guided by the decisions.

    I'm adding some new methods so the Brain can change AI States when the Player gives him orders.

    I'll prepare tomorrow a quick tutorial on how to achieve what you need

    Oh yeah!
    Dogs and Cats are definitely on my list!
    There's a Task.. the MoveStopTask where you can have the option to rotate in place, when you have a target it will look at it.
     
    mattxreality likes this.
  28. mattxreality

    mattxreality

    Joined:
    Dec 11, 2018
    Posts:
    57
    Thank you @Malbers ! I'll look into MoveStopTask and await the new tutorial!
     
  29. mandisaw

    mandisaw

    Joined:
    Jan 4, 2018
    Posts:
    82
    Just an FYI, but part of Malbers' awesomeness is that the Controller works with basically any model+animations. One of my current projects uses AC for humanoids (two different artists/sources, one for Players & one for NPCs) and animals (2-3 different artists/sources, one for a Pet, and one each for simpler land & aquatic animals).

    Besides the print tutorial, the YouTube videos on getting up and running with the new AC includes a walkthrough using a non-Malbers animal (baby dinosaur). Here's the playlist - https://www.youtube.com/playlist?list=PLh3LIrWD73cxXUqAOUoykYGDSl_CVk1QE
     
    mattxreality likes this.
  30. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    One more question.

    When the animal has picked something up, I try to bury this item.

    The only thing I do so far is call this method when he has something in his mouth:

    MAnimal.MainAnimal.Mode_Activate(4, 10);

    If I use the method, if he has nothing in his mouth, it works. But if he has something in his mouth in Item, the method does not work.

    I have been searching for quite a while now and only found out that it has something to do with MPickUp. But I don't know where the error is.

    Can you help me further?
     
  31. danteswap

    danteswap

    Joined:
    Oct 27, 2013
    Posts:
    164
    @Malbers Hi there i need some help Not much , I want my animal to attack other animals automatically i mean player will press attack button just 1 time and animal will attack other animal over and over till that animal dies , i have other ways to implement it but it would be nice if you can suggest a simpler way.
     
  32. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Here's a quick tutorial that may help you understand better how to do it:
     
  33. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    In case of the Pick up what I do is to disable completely the Inputs for the Actions: here (Wolf Lite)
    upload_2020-11-10_10-27-5.png
    So the animal cannot attack or making an action while it has an item on the mouth. (You can remove that) and instead of disabling the Inputs for the Modes you can disable some of the Modes Abilities instead:
    upload_2020-11-10_10-49-34.png

    You can do this in an easy way by giving those Abilities a Bool Scriptable var on the Active Value:
    upload_2020-11-10_10-51-28.png

    And then use that value on the Pick Up Events. and Set it to true or false when the animal has picked or droped an item.
    (You can use the same bool variable in several Abilities)

    Hope this helps
     
    mandisaw likes this.
  34. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Check that you have on your items the Pick up Reactions :
    upload_2020-11-10_11-24-0.png
     
    mandisaw likes this.
  35. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Here is a new Inspector for the Brain Feature... specifically for the AI States. so it can be easier to navigate. You can now change the Tasks and Decisions Inside the AI State without having to leave the Inspector ^^


    Ready by the end of the month

    @mattxreality I'm Still preparing the tuto (Finding the best way to make it easier ^^ )
     
    Last edited: Nov 10, 2020
    mandisaw and mattxreality like this.
  36. mattxreality

    mattxreality

    Joined:
    Dec 11, 2018
    Posts:
    57
    Thank you @mandisaw I did watch the video and gave a first-pass attempt at making a dog model I had conform to AC, but I had some unexpected results. I'll give it another try though. You're right, AC is awesome, and a lot to take in/learn. I currently have a good AI pet in my adventure scene thanks to Malbers' work. I'll continue learning more.
     
    mandisaw likes this.
  37. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Here's what I have so far :)
    Pressing Key 1: the Wolf follows the Player
    Pressing Key 2: the Wolf goes to Patrol
    Pressing Key 3: the Wolf goes to the nearest Seat Zone


    I'll be finishing the tutorial tomorrow ;)

    (I have made some tiny Fixes to the Brain Logic)
     
  38. Cabamacadaf

    Cabamacadaf

    Joined:
    Oct 2, 2017
    Posts:
    6
    Hi! I'm using your Animal Controller, and trying to use Unity's new Input System. I'm having some trouble converting the jump, sprint and action to the new system. Is there any easy way to convert the Animal Controller to use the new Input System?

    I also had some issues with the Simple Jump state, where the animator gets stuck in the jump animation/state in certain situations, usually when you hit the ground too fast. Do you have any tips on how to solve this?
     
  39. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    @mattxreality
    Here's the Update for the Brain logic... so you don't have to wait until the next update:
     

    Attached Files:

  40. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    That's my next goal... I'm working this week too on the new Input system integration...I'll let you know when it's ready
     
    Cabamacadaf likes this.
  41. mandisaw

    mandisaw

    Joined:
    Jan 4, 2018
    Posts:
    82
    The new update (1.2.2?) will be 2019.4/2020.1+, right? Or is that the next major update (1.3)? Just planning if I'll need to fast-forward plans to update my projects to 2020.1.
     
  42. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Yes the next update by the end of this month ;) Unity 2019.4 and Up
     
    mandisaw likes this.
  43. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Many thanks for the reply.

    I took some pictures to find the mistake. As an animal I use the Cougar. Not sure if I missed it, but it seems to have no animation for the pickup.
     

    Attached Files:

  44. Kojote

    Kojote

    Joined:
    May 6, 2017
    Posts:
    200
    Furthermore:

    I have now equipped the MPickUp with AbilityActivate, as they explained. The deactivation and activation works well, as you can see on the picture. But animation is still not played.

    By the way, digging out does not work either. He has nothing in his mouth and is also nothing deactivated
     

    Attached Files:

    Last edited: Nov 12, 2020
  45. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Yes, the cougar does not have animations yet for picking and dropping items yet... just the wolf,
    I have that on my to do list (to add to all the remaining animals)
     
  46. mikhail_suvorov

    mikhail_suvorov

    Joined:
    Jul 22, 2019
    Posts:
    21
    Hi @Malbers, I found a BUG in the MPickUp.cs script, or more precisely, this is not a bug, but a flaw, in the MPickUpEditor class, for extending the Inspector for MPickUp, you forgot to define the OnFocusedItem event.
    This event is used in the _OnTriggerEnter method, but there is no way to subscribe to it in the Inspector.

    I also noticed that you specified a different name for the OnItem event in the script extension.
     
    Malbers likes this.
  47. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Awesome Catch!!!
    I have fixed it!! (It will be ready for the next update which its almost ready!!)
     
  48. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Here another quick Feature for the new update:


    You can use Runtime GameObject Set for about anything, to store how many Animal you have on a scene, how many zones, how many enemies.. etc and access them without having Singletons or script dependencies
     
    mikhail_suvorov likes this.
  49. mikhail_suvorov

    mikhail_suvorov

    Joined:
    Jul 22, 2019
    Posts:
    21
    I know about this cool feature, this is part of Ryan Hipple's "Game Architecture with Scriptable Objects" talk at Unite Austin 2017 - Game Architecture with Scriptable Objects


    When I saw this conversation, I immediately started using his code in 2017. Also, on the basis of this, a lot of my ideas were born.

    So I made a simple script generator to create my own variables (ScriptableVariable) and events (GameEvent).

    - Scripts:
    ScriptGenerationWizard - https://pastebin.com/6kY33p0A
    ScriptGenerator - https://pastebin.com/ipLvKKGM

    - Templates:
    GameEventTemplate - https://pastebin.com/pGFfXPLs
    UnityEvent - https://pastebin.com/F7dAcAjA
    GameEventListenerTemplate - https://pastebin.com/bEwzvEgW

    This is how I came up with a ConditionComponent that works with an abstract ScriptableObjcet

    - Base Sripts:
    ConditionComponent - https://pastebin.com/KM7b6p1e
    ACondition - https://pastebin.com/F6WvNLfw

    - Examples Implementation
    BoolVariableCondition - https://pastebin.com/vDwFKDMp
    IntLessCondition - https://pastebin.com/aSQWPyx8

    At first it was good news for me that you added these approaches to your Animal Controller.
    But now I can't choose whose code to use, yours or mine?
    For example, what is better to choose
    1) My BoolVariable
    or
    2) Your BoolVar

    If part of my work will be in your AnimalController, then I will be happy to completely switch to using the Animal Controller Features.
     
    Kojote likes this.
  50. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    210
    I just purchased Irval and when testing with latest Animal controller, I'm getting:

    IndexOutOfRangeException: Index was outside the bounds of the array.
    MalbersAnimations.Utilities.BlendShape._PinnedShapeSetValue (System.Single value) (at Assets/Malbers Animations/Common/Scripts/Utilities/BlendShape.cs:168)
     
    Malbers likes this.