Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Malbers Animals-Creatures

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

  1. JBacal

    JBacal

    Joined:
    Jun 6, 2015
    Posts:
    59
    Finally, I'm making some progress converting Malbers Input to the new Unity Input System. But it seems that any changes to the inputs do not take effect unless I exit and restart Unity. Is this normal?
     
  2. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,823
    Some Standard Pipeline shots. There's Magic in the air :)

    swamp.jpg
    silhouette.jpg
    magic.jpg
     
  3. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,823
    Last edited: Mar 11, 2021
    Malbers likes this.
  4. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,823
    I made a modified script of above which you can use in addition to the above if you have Enviro. It allows you to fade through time when e. g. the Wolf's magic is triggered.

    Here's how it looks, depending on the time interval and duration parameters you set:



    Of course you can also change the weather, this method is helpful in that case:

    Code (CSharp):
    1. EnviroSkyMgr.instance.ChangeWeather( int weatherIndex);
     
  5. nathan2411

    nathan2411

    Joined:
    Sep 19, 2020
    Posts:
    2

    Hi Malbers,

    I tried the better fbx importer/exporter like you suggested but after playing around with it I can't seem to get it to work in blender the same way you showed it working in Autodesk. Since you said you were testing it out and got it to work in blender I was hoping you could tell me how you got it working. I recorded an attached video to show you more specifically what my issue is.





    Fundamentally I guess the issue is the same where I'm having trouble linking the animation to the bones on the armature properly since rather than individual bones linking it links the entire armature to the animation data of a specific animation in the action sheet under the dope editor.

    Any help is very much appreciated
    Thanks!
     
  6. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hey guys apologies for not being around on the Forums, I was doing support on Facebook, Discord and email; and I totally forgot the forums ... my bad!


    I have updated the Input Link to a new version check it out, I made some tests and it works just like the old one ;)

    Yes!
    On the Jump State change the Height Multiplier on the Jump Profiles:
    upload_2021-3-11_13-36-41.png
     
  7. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    So for that... what you can do is to create a simple script that listen to the Weapon Manager On Equip Weapon Event:
    upload_2021-3-11_13-45-51.png

    Using that event you can check if the Equipped game Object is a bow and if its true then you just need to Activate the Strafing
    (MAnimal.Strafe = true)


    Now on the Experimental Demo scene what I did was to Enable Strafing always when the Rider was Aiming (which is when the Rider uses a weapon that requires Aiming. e.g. Bow, Rock, Pistol)
    here:
    upload_2021-3-11_13-48-32.png

    The CM Cameras for Aiming States are also Activated by the OnAimSide Event...
    -1 for activating the CM Aim Left
    1 for activating the CM Aim Right
    and 0 for Not Aiming
     
  8. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    I have sent you the fix via PM :) ... Indeed the boar main model had a wrong position.
     
  9. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hey there! yes! I see hahah you are right!
    Instead of the last waypoint now you can use the Set Target Task... and find the Closest waypoint using Runtime GameObjects.
    upload_2021-3-11_14-7-27.png

     
  10. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Thanks for reporting this!! Due to that I discover some new bugs :) which I have already smashed!!

    Here's the fix:

    Also here's the Demo scene
     

    Attached Files:

  11. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Yes! the solution for that is to disable the colliders on the Death horse.. Since the Death State forces the Rider to dismount, all the Rider collider are enabled back, which are pushed by the Horse's colliders

    easy fix activating this option:
    upload_2021-3-11_16-12-17.png
     
  12. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Thank you for using the assets I really appreciate it
    Saldy there's no Fly AI Brain behaviour implemented yet (but it is on my to do list)
    https://malbersanimations.gitbook.io/animal-controller/quickstart/know-limitations
     
  13. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hi there, It was a bug on my side I have posted the fix on a past post, but here's the fix

    If you are still getting issues please let me know
     

    Attached Files:

  14. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    That's weird ... your connections are not being saved??
    also are you using the latest Input Link version v1.07?
     
  15. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    I see, I talked to the Better FBX Importer creator so he can add the Update Animation Only option to its asset and he was kind enough to set it on its to do list, if you can write him too so he noticed is a very requested feature I think he will work the development of that option sooner ;)

    Meanwhile, please tell me which animals do you need to be converted to Blender
    so I can prepare them in the old way ;)
    Setting it on max and importing it to blender with Better FBX Importer
     
  16. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,823
    I added an Aura 2 fader example. Looks like this when one fades volume density, i. e. ground fog in my case:

     
    Malbers likes this.
  17. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,823
    Tried a different ambience with the raven added. Thanks a lot to @YolanOTHER for providing the animated flags :)

    field 01.jpg
    field 03.jpg
    field 15.jpg
     
    Last edited: Mar 13, 2021
    JBacal and Malbers like this.
  18. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,823
    kikijin, Fer00m, JBacal and 1 other person like this.
  19. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,823
    kikijin, MasonWheeler and Malbers like this.
  20. KitBarry1809

    KitBarry1809

    Joined:
    Jun 27, 2018
    Posts:
    34
    @Malbers 1. the AI brain is still not working. It can't see anyone who's not on the same eye-level as the AI, and it only recognises someone as being seen *when they enter* the viewing angle at it's maximum range. So if you're using terrain it's no good you being near the animal and jumping up and down to cross the plane, you have to walk out of the detection range and then back in and you're only detected on entry, not while inside. Any time you're using terrain, any time the bear stands or sits this makes the guide-player-to-treasure functionality useless since the extremely-thin detection disc easily clears head-height of players/other animals. There's a reason unity has OnCollision Enter and Stay variants because on Enter isn't enough. 2. The same goes for the arrival decisions at waypoints: if it's not in some magical sweet spot of terrain/navmesh/animal behaviour it'll walk through a waypoint that seems to be perfectly "on the ground" and walk straight off the edge of the map forever in the last-known-good direction never trying to turn around and head back to the target waypoint. 3. the idle behaviours make it seem like the AI is broken too, since it says it's entered the move state while it's continuing to play a sitting or standing or whatever animation. A reasonable person would assume the AI overrides the animation whenever it changes state instead of "We'll just wait around while it finishes its other business..."
     
    Malbers likes this.
  21. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558

    1.2.4b(AC) - 16 March 4.2.4b(HAP) 2021 - Fixing the brain Damage caused by the previous update


    AC:

    Fixed: Fly State Gliding Gravity push was overwritten by the next line of code. Now its set on the right place.
    Fixed: Animal AI Control InOffMesh was not resetting when it finish an OffMeshLink
    Fixed: Mode Align was working on sleep/disabled animals.
    Fixed: Attack Trigger where activated also when the Animal was Sleep.
    Fixed: Input Axis on the Animal Component was not normalized.
    Fixed: Animal Ai Control. When a Air Destination was set the first time it was ignored.
    Fixed: Brain Animal Play Mode Task was failing if the Animal has no Target.
    Fixed: AI Control. If the animal was waiting .. HasArrived was not being updated.
    Improved: Brain Task Execution (cleaner code)
    Added: Scriptable Coroutines Core script.
    Improved: AnimTransform, BlendShape Preset, Bone Preset scripts. They all use Scriptable coroutines Now.
    Added: Material Lerp
    Added: Material Property Lerp
    Fixed: Override Start mode was not working properly when the Animal GameObject was hidden
    Fixed: Pick Up and Drop was still working when the script was disabled.

    HAP
    - No changes to the Riding system this time.. (But is important to maintain the same code on Both HAP and AC
     
  22. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hey @adavis1 thanks for your feedback I really appreciate it.

    The view Angle is actually controlled by the distance the representation should be something like this:
    upload_2021-3-16_14-8-0.png
    But I havent being able to find the way to represent that with gizmos :(

    What you can do is to eliminate the obstacles on the Detection so the Raycasting does not detect any... Here:
    upload_2021-3-16_14-11-53.png
    Set the Obstacle Layer to Nothing.

    That will ease the Look For Decision...
    If you want to detect some of the obstacles set all those gameobjects to a new Layer (E.g. "Wall")

    That one its a bug Indeed, can you share a screen capture video of that behaviour?
    to see if I can reproduce it on my side ..


    All the sitting/lie/sleep animations are interrupted in case the animal moves... you can check it out on the Animator Exit Transition:
    upload_2021-3-16_14-22-26.png

    Also the AI, every time a new Target is assigned I call Animal.ModeInterrupt() to stop any playing mode..

    I think you need to be interrupted completely without finishing the exiting animations? (E.g without finishing Sleep to seat) ??

    if that is the case then creating a new transition from Sleep to exit with Movement = true will solve your problem


    Hope this helps

    I really appreciate you testing out the asset, that helps me keep improving it

    Cheers!
     
  23. tahir_ali

    tahir_ali

    Joined:
    Jan 6, 2018
    Posts:
    119
    In scriptable event please add scriptable string var invoke function like float and int scriptable var.
     
    Malbers likes this.
  24. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Done ;)
     

    Attached Files:

    Gunhi and tahir_ali like this.
  25. tahir_ali

    tahir_ali

    Joined:
    Jan 6, 2018
    Posts:
    119
    I hope it will come in next update. So I don’t have to change it manually.
     
  26. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
  27. shooob

    shooob

    Joined:
    Dec 1, 2016
    Posts:
    6
    Hello! I have diving into the Animal controller and have really been enjoying it. I have tried a ton of different methods and packages, but this is well laid out and with a real understandable flow! Thank you, I have been achieving alot with it.

    I have hit a wall though with what feels like a bug... not sure tho. Seems new as well. When I add the Zone Component the interface is fine, until I add an Action Index. Then it become unreadable. Prefabs like, Eat, start in this unreadable sate and I get NullRef in ID.cs on line 85:

    if (PropertyValue != null)
    {
    result = Instances.FindIndex(i => i.name == PropertyValue.name) + 1;
    }

    I hope this is helpful and I am sorry if I have missed this elsewhere in the forum.
    thanks again!
     
    Malbers likes this.
  28. kikijin

    kikijin

    Joined:
    Nov 28, 2017
    Posts:
    3
  29. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    179
    Hello there! Just wondering : How to setup second attack on right mouse button?
    I was used mode Attack2 that have Attack Paw only.
    The conditions of Animator for Mode Attack Second in 9000

    The result is LMB standard attack works while once i click RMB - my character can't attack anymore.

    If i miss something, let me know please! All the best!
    upload_2021-3-21_3-26-37.png upload_2021-3-21_3-22-53.png

    upload_2021-3-21_3-17-12.png upload_2021-3-21_3-19-3.png
    upload_2021-3-21_3-13-15.png
     
  30. tahir_ali

    tahir_ali

    Joined:
    Jan 6, 2018
    Posts:
    119
    I am having a problem with LD always forward.in flight. It keeps increasing velocity. How can I stop it from increasing?
     
  31. fieldspaul69

    fieldspaul69

    Joined:
    Dec 24, 2020
    Posts:
    2
    Hello recently bought your animal controller it looks very promising...

    I updated to the newest versions and now the death zone does not work...
    I have looked over it and cant find anything glaringly off...

    any help would be appreciated.

    hey man..its under the the Jump state itself, when you create the "Jump state" click on that state thats created, and go down to Profiles I think...there is Jump height.
     
  32. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,823
    I added the Golems to see how they combine with the animals

    g5.jpg
    g2.jpg
    g3.jpg
     
    Malbers likes this.
  33. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hi there!
    So for Attack2 you should use the Attack2 ID for the Animator..
    To have a better understanding on how to make it work take a look to this page:
    https://malbersanimations.gitbook.io/animal-controller/main-components/manimal-controller/modes
    I see you are using 9000 to 10000 and the Attack2 ID is: 2 so it should be from 2000 to 3000

    If you still have issues after reading the modes let me now :)
     
    BATTLEKOT likes this.
  34. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Thank you so much for your kind words :) I'm always trying to improve with the new tendencies :) and I love Scriptable Objects Architecture :)

    Oh I see!
    Are you creating the Zone Component at runtime or are you instantiating the Prefab at runtime?

    I have added this null check to that line of code ... just in case:
    Code (CSharp):
    1.   if (PropertyValue != null && Instances.Count > 0)
    2.             {
    3.                 result = Instances.FindIndex(i => i.name == PropertyValue.name) + 1; //Plus 1 because 0 is None
    4.             }
    5.  
    Try that and tell me if there's no more errors for you
     
  35. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    This is due to the Increase Down velocity parameter on the Fly State
    upload_2021-3-23_13-55-25.png

    Set it to zero and the speed should not increase
     
  36. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    179
    Thanks! its works.
    Sorry for this kind of stupid questions, just a bit confused how to use your documentation =D

    Also how i can change Wolf sounds to something else on action button?

    And if i have second attack 2, how i can setup bigger damage when you attack by Attack2 ?

    Thanks!
     
  37. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,823
    Last edited: Mar 24, 2021
  38. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I just upgraded Unity to 2020.3 and Unka, Irval and Horseset to latest and have a load of compiler errors. Not sure how to fix. There are too many to copy them all here but heres a screenshot of the top ones. image_2021-03-24_160001.png

    Any assistance appreciated, thanks.
     
  39. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    210
    "Namespace already contains a definition for type" means that the type is being declared twice. The usual culprit is duplicate files.

    The best way to fix this would probably be to delete the entire "Assets\Malbers Animations" folder and re-import it. If that doesn't work, check back here again. (But of course don't do this if you have edited the Malbers code or assets in some way, or your changes will be gone.)
     
    Hawk0077 likes this.
  40. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks I will back the folder up and reimport: Unka, Irvil, Animset and Selector.
    But I suspect this wont work as I tried something similar with a previous issue with 2019. But here goes. Thanks by the way.
     
    Malbers likes this.
  41. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Yes , the best way is to Remove the Malbers Animations/Common Folder, and install it again from HAP or AC.

    The latest version on Unity 2019+ does not recognize the same file if that file was changed to a different location.
    And a few version ago I reorganized the scripts different folders :)
     
    Hawk0077 likes this.
  42. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    For the Sounds I use the Sound Behaviour on the Animator:
    upload_2021-3-24_12-44-29.png

    You can add any sound to any animations this way ;)

    For the Attacks I use the Attack Behaviours and Attack Triggers...

    Lets take for example the Cougar:
    The cougar has 4 Attack Triggers:
    upload_2021-3-24_12-46-51.png

    Each Attack Trigger has and ID or Index:
    upload_2021-3-24_12-48-14.png

    Which is Activated by the Attacks Animation on the Animator, using the Attack Trigger Behaviour:
    upload_2021-3-24_12-49-18.png

    So Different Animations Activate Different Attack Triggers...

    Knowing this you can have the Attack Triggers with Different Attack Damage, that are being activated by different Animations:
    upload_2021-3-24_12-50-45.png

    For more info on Attack Trigger and attack Behaviours check this link
    https://malbersanimations.gitbook.io/animal-controller/secondary-components/mdamager/mattack-trigger

    Hope this helps
     
    BATTLEKOT likes this.
  43. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thank you Malbers. I am just installing everything again as a test and will backup the Malbers folder each step. Then maybe try your way, just removing the common folder. thanks again.
     
    Malbers likes this.
  44. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    yeah thanks, both ways worked so reverted back to my recently working updated one (incase I made any changes) and then removed and readded the common folder. Aweeome. Thanks Malbers.
     
    Malbers likes this.
  45. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks, got it working now with yours and malbers help. Much appreciated. Thanks.
     
    Malbers likes this.
  46. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I just installed CTS Shader by Procedural Worlds and now I get the error below.

    When I delete the CTS folder these errors go away? Not sure about this one either. Many thanks in advance for any assist.
    image_2021-03-25_173346.png
     
  47. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Those errors are in full:

    Assets\Malbers Animations\Horse AnimSet Pro\Integrations\Invector\Basic\InvectorHAPLink.cs(90,24): error CS1061: 'vThirdPersonInput' does not contain a definition for 'OnLateUpdate' and no accessible extension method 'OnLateUpdate' accepting a first argument of type 'vThirdPersonInput' could be found (are you missing a using directive or an assembly reference?)

    Assets\Malbers Animations\Horse AnimSet Pro\Integrations\Invector\Basic\InvectorHAPLink.cs(91,24): error CS1061: 'vThirdPersonInput' does not contain a definition for 'OnLateUpdate' and no accessible extension method 'OnLateUpdate' accepting a first argument of type 'vThirdPersonInput' could be found (are you missing a using directive or an assembly reference?)

    Assets\Malbers Animations\Horse AnimSet Pro\Integrations\Invector\Basic\InvectorHAPLink.cs(101,41): error CS7036: There is no argument given that corresponds to the required formal parameter 'arg0' of 'UnityEvent<GameObject>.Invoke(GameObject)'

    Assets\Malbers Animations\Horse AnimSet Pro\Integrations\Invector\Basic\InvectorHAPLink.cs(129,24): error CS1061: 'vThirdPersonInput' does not contain a definition for 'OnLateUpdate' and no accessible extension method 'OnLateUpdate' accepting a first argument of type 'vThirdPersonInput' could be found (are you missing a using directive or an assembly reference?)

    Assets\Malbers Animations\Horse AnimSet Pro\Integrations\Invector\Basic\InvectorHAPLink.cs(130,24): error CS1061: 'vThirdPersonInput' does not contain a definition for 'OnLateUpdate' and no accessible extension method 'OnLateUpdate' accepting a first argument of type 'vThirdPersonInput' could be found (are you missing a using directive or an assembly reference?)
     
  48. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi @Malbers !!!
    I want to use Dragon Little Tiger in HDRP but I see that the "malbers shaders" are not for HDRP.

    Are you planning to upgrade to implement your shaders to HDRP?

    Greetings
     
  49. fieldspaul69

    fieldspaul69

    Joined:
    Dec 24, 2020
    Posts:
    2
    figured out my issue...durp..

    gotta say this is a great controller!!

    do you have plans on adding foot IK placement?

    you definitely should, but with the ability to use a generic armature.
     
  50. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,823
    Here comes Irval :D

    i1.jpg
    i2.jpg
    i3.jpg
    i4.jpg
    i5.jpg
     
    ftejada likes this.