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
    Yes to the scalable bones and yes to the female conterpart ;) but one thing at a time haha :) :)
     
  2. Codeglee

    Codeglee

    Joined:
    Nov 28, 2013
    Posts:
    1
    If like me you created a new Nav Agent Type, it turns out that it only works with the default Humanoid agent type.
    Remove yours / reset to Humanoid and it it should be fine.
    Also, if you were getting "Failed to create agent because it is not close enough to the NavMesh" in the console, create an empty game object in your Horse object and add the agent in there, I copied the component settings from the Horse AI model to get it to work for me.
     
    mros and Malbers like this.
  3. DeidreReay

    DeidreReay

    Joined:
    Oct 28, 2019
    Posts:
    50
    Hey trying to work out HAP with the new invector shooter. Followed instructions and most things seem fine however the shooter documentation is not finished???
    Also the animator seems to have some troubles as now the characters head (where they are looking at with relation top the camera) is not staying where the camera should be.

    Any idea what is going wrong?
    Also any idea when the documentation will be complete for the shooter sections of invector integration.?
     
  4. DeidreReay

    DeidreReay

    Joined:
    Oct 28, 2019
    Posts:
    50
    Screenshot of issue as described
     

    Attached Files:

  5. amit-chai

    amit-chai

    Joined:
    Jul 2, 2012
    Posts:
    80
    Hi, I've seen there is a new update on the asset store. I am also using Invector which also got a new update. when can we expect the integration package for Invector?
    Thanks!
     
  6. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @Malbers There is still an issue unfortunately if you destroy and item in the focused area of the animal. IT says missing when you remove the item. It's strange because its how you pick the item up but for some reason it says missing and causes and error instead of being null. An easy test for you is stand in front of pickupable and when its in the focused item section select it in the hierarchy and delete it. The focused item now says missing and throws up error. I've tried telling setting the focused item = null but that doesn't work.
     
    Malbers likes this.
  7. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    I have updated the Integration to the latest version of both assest.
    This is while using any weapon or just riding the Horse?
     
    amit-chai likes this.
  8. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    New version with tons of new goodies and Bug fixes are live on the store:)
    https://malbersanimations.gitbook.io/animal-controller/annex/changelog

    1.1.6(AC) - <2020 May 2020> (HAP 4.09)
    • Added: Custom Up Down Axis to the Animal Controller. Used on Mobile Up Down Buttons for Flying
    • Improved Movement Logic for the Animal when moving with Direction.
    • Added: Damager transform to the IMDamage Interface (To know who's doing the damage)
    • Removed CROSS_PLATFORM_INPUT (is obsolete)
    • Fixed: Shader Water .. now its made with ASE (it was causing issues with URPL)
    • Fixed: State.EnterAnimation() method. Some Stae weren't modifying the AnimTags
    • Fixed: Sometimes modes where entering twice on the Animator, causing invoking events twice.
    • Added: Tags Static Method: GetGameObjects by Tag
    • Fixed: Underwater Check for water even though the animal is not on the water.
    • Added: AiAnimalControl.SetDestination(Vector3Var newDestination)
    • Fixed: Ai Animal control does not control anymore the speed changes.
    • Added: Timeline integration.
    • Added: MTimelineManager Component.
    • Added: Zone warning when an animal cannot activate an Mode/Action Zone
    • Modified: Check for null reference on the Aim and LookAt components
    • Added: Scriptable Variable Material_List
    • Fixed: When Animals were grouped on an Empty GameObject, the Attack triggers used the first Animal on the hierarchy. (SOLVED).
    • Added: Update Input Source method on the Animal (Rewired Integration)
    • Fixed: Brain was throwing errors when Waypoints were removed at runtime. SOLVED
    • Added: GetResource method to the Malbers tools.
    • Added: Custom Tags to Zones. Only Animal with the zone tag can interact with it.
    • Fixed: The way the wolf rotates In Place when change the speed abruptly
    • Added: Root Gameobject Reference for the Rider. This may cause issues with characters that have the Animator in places different from the Rider component
    • Added: Drag on Area Mobile joystick.
    • Fixed: Unwanted falling From Edge while going uphill. FINALLY!!!
    • Added: Anti-Fall Feature to the Locomotion state (For animals without a Fall State) E.g. Elephant
    • Improved: Try Activate Condition on the Idle and Locomotion State
    • Fixed: Gravity Bug when the animal get the head sucked on a ledge.
    • Small Optimizations to all MAnimal public Properties.
    • Added: HasMalbersTag extension to transform and gameobject
    • Added: Animal.HasState(string stateName)
    • Added: Malbers Menu > Upgrade Malbers Shaders to URLP/HRLP
    • Added: Step Manager can now Instantiate Tracks too, instead of using one Particlesystem.
    • Added Height Optional Parameter to the Animal Controller
    • Added Height Parameter to the Zone Component.
    • Added: Affect Stat on the Fall State (E.G. Reduce Health by Fall Distance)
    <HAP>
    • Fixed: Sometime an Error was thrown on Straight mount when the animal was dismounting.
    • Added: Mount→ Disable Mount Triggers.
    • Fixed: UI on the Demo scene was disconnected . (Arrows and Bullet Count)
     
    mandisaw, ILJI and Rowlan like this.
  9. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    I did the test and no errors for me...

    Are you using which function? are you using
    MPickup.PickUpItem() or MPickup.TryPickUp()

    Because you should be using MPickup.TryPickUp()

    And can you tell me the line of the code of the error?
     
    AndyNeoman likes this.
  10. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    The error happens in your demo zone too so it's not anything with my items. If you walk up to a pickable in you demo scene with wolf lite this same error occurs. Delete the pickable when it is in the focused zone and it says the item is missing and it stops the pickup working properly as the player does not recognise the zones until another item has entered the focused zone and replaced "missing"
     
  11. warren-miller-maltd

    warren-miller-maltd

    Joined:
    Jul 26, 2012
    Posts:
    53
    Is it possible to make Back on the mobile joystick make the player walk backwards, instead of turning around please?
    thx
     
  12. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    the "missing" on the Inspector is completely normal when you have a deleted gameobject that was referenced..
    the problem is when it throws an error.. that is why I want to see the line of code on the console :)
    but I have added some tweaks to the code to safe check the null GameObjects:
    try this:
     

    Attached Files:

  13. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    If you disable the Camera Input on the Animal you can use the walk backwards animations
     
  14. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Yeah I understand but the 'error' isn't a line of code as such it just stops your system working properly as its out of order. So for example my AI will make a nest combining two items they are both removed and replaced by the nest prefab now because the missing reference then causes the AI to not be able to use mode sleep on the nest, it is stuck in pickup/drop mode - so there is no error as such in the console but the controller is not working until we can get somethings into the missing focused item. (This is the same for the player as well as AI)
     
  15. warren-miller-maltd

    warren-miller-maltd

    Joined:
    Jul 26, 2012
    Posts:
    53
    thanks! that works but when I hit Play the Camera Input bool goes back to true. can't quite figure out why.
    thanks!
     
    Malbers likes this.
  16. vorokoi

    vorokoi

    Joined:
    Oct 18, 2019
    Posts:
    39
    ganaware and pushingpandas like this.
  17. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    That is because the Set Movement Mobile set by default the Use Camera Input

    Just disable it
    upload_2020-5-22_12-44-19.png
     
  18. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    I tried documentation but animals are all black. Rest it ok
     
  19. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Well, does it support HDRP?
     
  20. warren-miller-maltd

    warren-miller-maltd

    Joined:
    Jul 26, 2012
    Posts:
    53
    awesome. thank you so much.
     
  21. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    @Malbers do you have a turorial how animal can eat and get HP back for the AC controller? Thank you!
     
  22. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Oh I understand now :)
    I was testing only with the player I'm making some test on my side with the AI..

    I'm curious on how you create your Tasks and decisions to achieve the Pick up and Merging into the nest
     
  23. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    I have fixed the issue in my use case by simply moving the transform position outside the pickup box (The simplest hacks are the best :)) I would still say the issue needs addressing though because I can see instances where items will be removed in game when in one of these pickup areas on an animal.

    Now I have passed this roadblock I will get the video up I promised showing the AI tasks.

    What I have done for the nest is when the AI Stat Tired is <50 it will look for a nest, if there is none within it's radius they make a decision to look for a branch, collects it then looks for a second branch (While holding a branch decision is true) then go to the second branch and attempt the drop mode action. The branches have their own little script on collision to remove themselves and spawn a nest prefab. The original Task of finding a nest becomes true so the AI will move towards it then instigate its sleep action in the nest which also has a sleep zone in it which makes them no longer tired.
     
    Last edited: May 25, 2020
    Malbers likes this.
  24. rudhan

    rudhan

    Joined:
    Dec 10, 2016
    Posts:
    1
    this might be a beginner question but whenever i try to change shader to universal pipeline from graphic settings my character look like this. is there a way to fix this or am I missing something.

    Edit I upgraded through render pipeline if anyone has the same issues. Works for now.
     

    Attached Files:

    Last edited: May 24, 2020
    Malbers likes this.
  25. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Hello, I got now all running. Do you have a tutorial how to use Thirst and Hunger Stats? I found them in the files but I dont know how / where to set them up.
     
  26. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    69
    @Malbers Hope you are working on UCC integration as well :) Thanks
     
  27. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    hahah so glad to know that :)

    From what I understood what you can do is ,to avoid errors:

    Create a new Wait Ai State (with no tasks and 1 Wait Decision (with 1 sec or more))
    after you merge the branches .. and then go to Find the Nest AI State...

    Actually those are simple stats (no logic around them) you can create wathever you want with them...

    For example you can added to an animal, and set the Hunger to Degenerate... and with the Unity Events when is empty you can connected to the health and start degenerating the health too..

    Or in case of the AI animal you can create a AI State that checks with a decision if the Hunger is Lower to 50 and then go find a Eat zone....

    It all depends on what you want to do :)

    Actually yes... I started working on it last week :)
     
  28. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @Malbers. When you set the obstacle layer for item does it not stop the AI from selecting the item as a target? I am having an issue where the item the AI has picked up is being selected as the next target (Sure it wasn't before) so I thought changing it's layer when picked up to the obstacle layer would take t from the target list but is not. The problem is with the nesting (I'm not sure why this is now happening as before it was working fine. AI wont go to the second branch because it sets the branch in hand as the target which then makes it think its arrived so they drop the item.

    EDIT: I Fixed this issue but thought I would leave here as it might be useful to others. I use the tag script in the animal controller and I have that set in the pickup mode so it disables the tag script when picked up (And re enables on drop). It had been removed which is why the AI was still trying to target it.
     
    Last edited: May 26, 2020
    Malbers likes this.
  29. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Ok thank you. When do you think is the UCC integration dry?
     
  30. amit-chai

    amit-chai

    Joined:
    Jul 2, 2012
    Posts:
    80
    Hello again, I may have asked it already, but I still wonder, is it possible for the rider to use the weapons while not mounted?? this could be so great if so. can you please help, direct me to where to look?
     
  31. RemusRain

    RemusRain

    Joined:
    Mar 9, 2019
    Posts:
    16
    Dear @Malbers,

    I purchased the Poly Art Animals Forest Set and would like to have a customer animation with a custom animation state in the raccoon animal controller. I already managed to create a new aniamtion state, a new animation ID and managed to activate it by input (StatebyInput). In that state, I will create a custom animation, where the animal is strafing. For this I need the animal to be fixed in it's rotation though.

    So here is my question: How can I turn the rotation speed of the animal off completely during that animation? Is the rotation speed solely controlled with the root motion of the animations? Because so far I only saw a way to increase the rotation speed to the base rotation speed of the animal.

    Thank you very much,
    Remus
     
  32. RemusRain

    RemusRain

    Joined:
    Mar 9, 2019
    Posts:
    16
    Hey @Malbers,

    I have another question: I have a new custom animation state for the controller that needs to be enabled and disabled by input. I already managed to successfully enable it with input using the StatebyInput method. Is there a similar method for disabeling it with input?

    When I'm checking for input in the TryExitState, it doesn't seem to recognize half of the time.

    Thanks,
    Remus
     
  33. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Screenshot (1).png

    Hi @Malbers. The update did not fix the zone script bug in the inspector unfortunately. See picture attached here the zone script does not show correctly so you cannot alter any of the fields.
     
  34. mbussidk

    mbussidk

    Joined:
    May 9, 2017
    Posts:
    67
    Hi @Malbers I'm trying to have an AI fly (using Unka as a base). I can successfully take off with
    Code (CSharp):
    1. _aiAnimal.State_Activate(StateEnum.Fly);
    but then I can't land... If I ignore movement for now and just want to hover in place for 3 seconds then land, both
    Code (CSharp):
    1. _aiAnimal.State_Activate(StateEnum.Locomotion);
    and
    Code (CSharp):
    1. _aiAnimal.State_Get(StateEnum.Fly).TryExitState(0f);
    have the same effect, i.e. nothing: Unka keeps flying idle in place. What is the simplest way to land by script?
    I guess what I need is: how do you land by pressing Q again in the Unka Demo scene?
     
    Last edited: May 28, 2020
    Malbers likes this.
  35. mbussidk

    mbussidk

    Joined:
    May 9, 2017
    Posts:
    67
    Nevermind... Calling ExitState() on the Fly state works!
     
    Malbers likes this.
  36. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Yes that is one Solution ... the correct one is:

    Code (CSharp):
    1. _aiAnimal.State_Get(StateEnum.Fly).AllowExit();

    That allows lower states to try to activate themselves :)
     
  37. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    At the moment no, With the current Rider Controller No, I'm preparing the Animal Controller to work fully with humanoids
    Hence Steve:
    upload_2020-5-28_21-59-42.png
    And when Steve is out, I will make him use weapons while is on foot. And Mount the Horse
     
    HeyBishop and mandisaw like this.
  38. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    That is great to know :)
    When is ready I will post it everywhere :)
    The integration will only have the Riding system, not the Combat while riding.... that requires help from justin, his code is too advanced for me :(

    You can create a new Speed Set for that particular New State

    and there change the Rotation Speed for that particular state
    upload_2020-5-28_22-20-8.png

    if you want to complete remove the Rotation of the animal completely you can also use this:
    animal.
    animal.AdditiveRotation = Quaternion.identity; That will remove completely the rotation of the Animal
     
    Last edited: May 29, 2020
    RemusRain likes this.
  39. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Yes! the correct way is to use AllowExit(), that allows lower states to try to activate themselves

    This is how the States work:
    https://malbersanimations.gitbook.io/animal-controller/main-components/manimal-controller/states
     
    RemusRain likes this.
  40. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    I see some ID Missing there!
    Can you tell me how to reproduce it?
    Did you change something at runtime in the Zone?
    and can you show me the full log of the error to see which one is the script that starts the error :)
     
  41. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    69
    In invector integration i can't find SEt Target please help? Step 16 in your doc. Also cant find the aim /Crosshair
    upload_2020-5-29_12-2-10.png
     
  42. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Hello, I have a problem. I want to use Game creator with your animals but I want use your awesome controller. Somehow the camera is fubar when I add a gc trigger. I saw that your camera will attached to the animal? How can I remove that? I want to use a different camera system. Thank you!!!
     
  43. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    You need to Use the Transform Response
    ChTc3DKcim.gif
     
  44. Malbers

    Malbers

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

    You can use any camera rig you want, the FreeCamera Rig is completely independent from the Animal controller.
    In fact I highly recommend to use Cinemachine instead. Simply remove it
     
  45. RemusRain

    RemusRain

    Joined:
    Mar 9, 2019
    Posts:
    16
    Hi @Malbers,

    Thanks for helping me out! :) Just one more question: how can I make the animal accelerate faster to full run speed in locomotion? It feels like it takes too long until it picks up speed.

    Thanks,
    Rene
     
  46. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    I did remove it but always when starting in editor, a main camera will be attached to the player prefab. Where is that set?
     
  47. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    You can change the Starting speed here:
    upload_2020-5-30_10-21-50.png
     
  48. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Can you show me a screen recording of the issue?
    because on HAP there's no code of instantiating any camera on start
     
  49. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Iam using the animal controller with racoon. I try to make a shot.
     
  50. amit-chai

    amit-chai

    Joined:
    Jul 2, 2012
    Posts:
    80
    Great :)
     
    Malbers likes this.