Search Unity

Malbers Animals

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

  1. Farapang

    Farapang

    Joined:
    Jul 23, 2013
    Posts:
    15
    Nice one cheers!

    I can't reproduce that error even with 20 wolves all running through a tight gap with increased speed. It must be something to do with creating them from a trigger. So its probably not an issue with your work, but with mine. I'll let you know if it happens again under normal circumstances.
     
    Malbers likes this.
  2. Farapang

    Farapang

    Joined:
    Jul 23, 2013
    Posts:
    15
    If I destroy an animal (de-spawn because of distance) while it is using an action zone, it has this error. Any ideas on how to solve it:
    MissingReferenceException: The object of type 'Animal' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    UnityEngine.Component.GetComponentInParent (System.Type t) (at C:/buildslave/unity/build/Runtime/Export/Component.bindings.cs:109)
    UnityEngine.Component.GetComponentInParent[IAnimatorListener] () (at C:/buildslave/unity/build/Runtime/Export/Component.bindings.cs:114)
    MalbersAnimations.Utilities.Messages.SendMessage (UnityEngine.Component component) (at Assets/Malbers Animations/Common/Scripts/Utility/Messages.cs:24)
    UnityEngine.Events.InvokableCall`1[MalbersAnimations.Animal].Invoke (MalbersAnimations.Animal args0) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:207)
    UnityEngine.Events.UnityEvent`1[T0].Invoke (.T0 arg0) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent_1.cs:58)
    MalbersAnimations.ActionZone+<OnActionDelay>c__Iterator1.MoveNext () (at Assets/Malbers Animations/Common/Scripts/Actions/ActionZone.cs:245)
    UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
     
    Malbers likes this.
  3. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    Humm Interesting I will Investigate it .... I believe is due because the Action has a Coroutine and is trying to access the animal after is destroyed.... with some Null checking I believe it will solved...

    I'll let you know when I kill that bug ;)
     
    Farapang likes this.
  4. GeometryBox

    GeometryBox

    Joined:
    Mar 23, 2018
    Posts:
    3
    The tiger while running if jumps into the water, it doesn't continue swimming. If it's trotting or waling before it enters the water, then it continues to move forward as desired. But jumping into the water somehow disables it's inputs.
     
  5. JasonDaze

    JasonDaze

    Joined:
    Jun 3, 2018
    Posts:
    1
    Please make a climb example in the AI scene as well.
     
    Malbers likes this.
  6. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    Hi there!!
    Can you make a video of the problem ?...to see if I can reproduce it on my side
     
  7. HeyBishop

    HeyBishop

    Joined:
    Jun 22, 2017
    Posts:
    111
    Rather than reinvent the wheel, I was wondering if anyone in this forum has written a script to command the animals to walk to where the user touches or clicks on screen. Would you mind sharing?
     
    Malbers likes this.
  8. Volcanicus

    Volcanicus

    Joined:
    Jan 6, 2018
    Posts:
    169
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.AI;
    5.  
    6. public class Movement : MonoBehaviour {
    7.     //don't forget Nav Mesh Agent and using UnityEngine.AI
    8.     //set bool parameter into animator if needed
    9.     //running is set to true and transits from idle to run
    10.     //running is set to false and transits from run to idle
    11.  
    12.     private Animator mAnim;
    13.     private NavMeshAgent mNav;
    14.     private bool mRun = false;
    15.  
    16.     void Start(){
    17.         mAnim = GetComponent<Animator>();
    18.         mNav = GetComponent<NavMeshAgent>();
    19.     }
    20.      
    21.     void Update(){
    22.         Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    23.         RaycastHit hit;
    24.  
    25.         if(Input.GetMouseButtonDown(0)){
    26.             if(Physics.Raycast(ray, out hit, 1000)){
    27.                 mNav.destination = hit.point;
    28.             }
    29.         }
    30.  
    31.         if(mNav.remainingDistance <= mNav.stoppingDistance){
    32.             mRun = false;
    33.         }
    34.  
    35.         else{
    36.             mRun = true;
    37.         }
    38.  
    39.         mAnim.SetBool("running", mRun);
    40.  
    41.         if (mNav.velocity.sqrMagnitude > Mathf.Epsilon)
    42.         {
    43.             transform.rotation = Quaternion.LookRotation(mNav.velocity.normalized);
    44.         }
    45.  
    46.     }
    47. }
    48.  
    I use that in my other project. You may need to tweek the Malbers Animal parameters in order to get smoother movement.
    You will also have to set animation triggers based on movement as per comments.
     
    Last edited: Feb 16, 2019
    HeyBishop and Rowlan like this.
  9. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    The rabbit has a Scene sample for Point Click to move (I need to add it to all the others ones...but I'm working on the new controller to make all kinds of sample scenes for everyone ;) )
     
  10. HeyBishop

    HeyBishop

    Joined:
    Jun 22, 2017
    Posts:
    111

    This is very generous of you!! I can't wait to try this out.
    Cheers!
    Wouldn't you know, the rabbits are one of the few I haven't gotten!
     
    Malbers likes this.
  11. GeometryBox

    GeometryBox

    Joined:
    Mar 23, 2018
    Posts:
    3
    Here's the link to the video. If it goes into the water without jumping, it's all fine then. Also, if it jumps to another flat surface while running, it takes a pause and then continues the running. I have tested using both "Always Forward" selected and not selected.

    https://www.dropbox.com/s/c15vv3vnzqka1ti/TigerJump.mp4?dl=0
     
    Malbers likes this.
  12. GeometryBox

    GeometryBox

    Joined:
    Mar 23, 2018
    Posts:
    3
    Another query, the Tiger doesn't play the take damage animation in the running mode. It's working fine with the walk and the trot mode. The damage is taken on the life but the animation doesn't play. Also when the life is 0 while it's running, it stuns for a moment and continues running. It's like the run animation is overriding all other.
    It can also be reproduced in the demo scene.
     
    Malbers likes this.
  13. HeyBishop

    HeyBishop

    Joined:
    Jun 22, 2017
    Posts:
    111
    In the spirit of sharing, here is the script I wrote to have the racoon go to where the user touchs on a mobile device.

    Code (CSharp):
    1. using UnityEngine;
    2. using MalbersAnimations;
    3.  
    4. public class TouchToMoveAnimal : MonoBehaviour
    5. {
    6.     public AnimalAIControl animalAgent;
    7.  
    8.     void Update()
    9.     {
    10.         if (Input.touches.Length > 0)
    11.         {
    12.             if (Input.GetTouch(0).phase == TouchPhase.Began)
    13.             {
    14.                 Ray touchRay = Camera.main.ScreenPointToRay(Input.GetTouch(0).position);
    15.                 RaycastHit hit;
    16.  
    17.                 if (Physics.Raycast(touchRay, out hit))
    18.                 {
    19.                     Vector3 destinationPosition = hit.point;
    20.                     animalAgent.SetDestination(destinationPosition);
    21.                 }
    22.             }
    23.         }
    24.     }
    25. }
    26.  
     
    Volcanicus and Rowlan like this.
  14. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    908
    You guys are awesome. I wish those user scripts would be collected at a dedicated location. @Malbers? :)
     
    Malbers likes this.
  15. HeyBishop

    HeyBishop

    Joined:
    Jun 22, 2017
    Posts:
    111
    A strange thing is happening with the AI Raccoon after an action is triggered by an Action Zone. I have a simple scene, with the TouchToMoveAnimal script shared in my previous post, attached to the default Raccoon Poly Art AI prefab. I can touch anywhere in my scene on the navmesh, and it goes right to where I want, and then stop successfully. If the animal passes through an action zone set to automatic - it will do the action. But after, it starts walking forward indefinitely. Touching a new point on screen work. Any ideas?
     
  16. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    Found the Error...

    The Swim Animations is missing the Swim Tag
    upload_2019-2-19_11-14-35.png
     
    mandisaw, GeometryBox and Rowlan like this.
  17. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    Here's the fix for the Animator ;) I remove some transitions on the Deaths and I have added an Additive layer for damaging the animal while running
     

    Attached Files:

    GeometryBox likes this.
  18. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    I'll make a sub Folder on the Integrations folder for Community scripts ;)
     
    HeyBishop likes this.
  19. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    Automatic actions zones are meant to be used when the Animal is controlled with the Malbers Input..

    You need to make the action and continue to your desired point? or make the action and stop?
     
  20. HeyBishop

    HeyBishop

    Joined:
    Jun 22, 2017
    Posts:
    111
    I think I'd want the animal to make the action and stop. That would be true if the player sets the destination point to be the Action Zone (such as the player seeing food for the animal, selecting it to make their animal go over and eat it), or even if the player sets a destination point that is beyond an Action Zone, and the animal happen to cross over it and the animal would stop and eat/sleep/do the action.
     
  21. KeithBrown

    KeithBrown

    Joined:
    Apr 1, 2017
    Posts:
    112
    @Malbers How about a github public project? This way the scripts are not pushed to the users unless they really want them?
     
  22. Volcanicus

    Volcanicus

    Joined:
    Jan 6, 2018
    Posts:
    169
    I'd rather keep them private, curated and dealt with by the owner, Malbers, since this is a bought asset. Otherwise, it would be very tedious to keep track of all of them for all the animals without proper QA.
     
  23. Kougasama

    Kougasama

    Joined:
    Jul 13, 2015
    Posts:
    10
    Do you, by chance, take commissions too?
    I love your work, but there's a couple animals I could really use for my project, not in your roster so far though.
     
    SirTwistedStorm likes this.
  24. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    thanks for the offer, I really appreciate it, but unfortunately I'm not available...
    I'm already working on several projects at the same time besides the assets
    Kind Regards
     
    mandisaw and Kougasama like this.
  25. herr_P

    herr_P

    Joined:
    Jun 8, 2017
    Posts:
    2
    Hehey! Thanks for awesome assets!

    At some point I could swear that there was a way to toggle jump-land penalty, but now I can't seem to find it(?)
     
  26. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    Do you reffer to the Always Land Animation?? or the Issue with landing sometimes on the air?
     
  27. brettj

    brettj

    Joined:
    Feb 9, 2015
    Posts:
    29
    I'm working on a custom texture for the Wolf and noticed that a lot of the parts overlap. Could you edit the UVs so each part is separated and has it's own labeled color swatch in the PSDs? For example, It would be really helpful to have the outer edge of the wolf ears to be a color different from the nose. Thanks!
     
    Malbers likes this.
  28. Farapang

    Farapang

    Joined:
    Jul 23, 2013
    Posts:
    15
    Any news on when climbing for the Racoon will be coming?
     
  29. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    I will upgrade the currect Color Chart to the new Improved Shader Color chart 4x4 I'm using with the raccoon and the Raven :) but after I finish the new controller :)

    with the new controller :) which it will come with the horse update :)
    that is one of the reason for the new controller... So I can add or remove features without affecting the core controller..
     
    KeithBrown likes this.
  30. MisfitVillage

    MisfitVillage

    Joined:
    Jan 3, 2017
    Posts:
    12
    Hey Malbers, is it possible to use your models and anims from this package with a simpler animator (no layers etc) and none of your scripts? We would just use them for a mobile endless runner game. Basically what I'm asking is - how easy is it to remove all special features from this package and to be left with just the models and their animations?
     
  31. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    Yes you can :)

    Remove all the scripts and extra files if you like... you have everything you need to create your own Animator from scratch
     
    mandisaw and MisfitVillage like this.
  32. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    146
    I would love to see a lion pack. Male, female, and cub would be ideal.
     
    Malbers likes this.
  33. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    is on my list! for the Savannah pack :)
     
    Last edited: Apr 23, 2019
    mandisaw likes this.
  34. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    908
    i hope those come realistic out of the box :D
     
    Malbers likes this.
  35. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    hahahah first the wolf and the deer (after the horse of course)
     
    Rowlan likes this.
  36. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    146
    Does the bear have a stand+roar animation like what you see from trained bears in movies? I didn't see it in the video.
     
  37. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    Yes it has :) it has Roar on ground and Roar Standing
    Check the Sketch Fab :)
     
    JohnnyFactor likes this.
  38. brettj

    brettj

    Joined:
    Feb 9, 2015
    Posts:
    29
    I think the getDamaged method in the Wolf's AnimalCallBacks.cs is calculating the direction incorrectly. I should be Theircenter - Mycenter (see below), assuming Mycenter is the animal being damaged. Also, it might help to rename the variables damagedCenter and attackerCenter or something like that to make things clearer.

    Also, should DamageValues class be a struct instead?

    Code (CSharp):
    1.         public virtual void getDamaged(Vector3 Mycenter, Vector3 Theircenter, float Amount = 0)
    2.         {
    3.             DamageValues DV = new DamageValues(Theircenter - Mycenter, Amount);
    4.             getDamaged(DV);
    5.         }
    Thanks for the great assets.
     
    Malbers likes this.
  39. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    Thanks so much for this!

    I will gladly use suggestions :D
     
    Weblox and brettj like this.
  40. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    brettj likes this.
  41. mandisaw

    mandisaw

    Joined:
    Jan 4, 2018
    Posts:
    24
    The new modular controller looks great, and exactly what I need! I'm integrating multiple animals into an existing hybrid setup (Adventure Creator + Ootii Motion Controller + my own tactical RPG components), and the new approach will make integration so much easier. My game will have AI-controlled animal-companions and input-controlled animal-transformed PCs, alongside the usual humanoid characters, so the more controls in common, the better. Your packs are way more than just models+animations!

    Already had the Poly Fox for months as a dev-test, but just snapped up the full Poly Forest Pack in today's sale. Totally looking forward to the Savannah Pack :D, it'll be perfect for my MidEast/Silk Road-setting. Is there a preview coming for that one, or even a list of planned animals? :crosses fingers for a hyena & gazelle/antelope:

    (Enjoy the vacation, no problem waiting on a reply :) )
     
    Malbers and DrOcto like this.
  42. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    139
    Hi,

    I am just wondering the poly art forest was reduced at $59 for the may sale and it isn't anymore. Wasn't the sale until may 15?

    Thanks.
     
  43. mandisaw

    mandisaw

    Joined:
    Jan 4, 2018
    Posts:
    24
    There are two sales categories happening concurrently - the main sale is 50% off a bunch of assets through mid-May, but there's also a one-day sale of 70% off on a single asset. The asset picked for the 70% sale changes daily (I think at midnight Pacific time), probably to encourage people to check back every day.
     
  44. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    139
    @mandisaw I wasn't aware of the one-day sale of 70% off on a single asset. Thanks a lot for the info.
     
    mandisaw likes this.
  45. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    161
    Hi Malbers,:)

    Just in case: Wolf FBX model is crashing HairWorks FurViewer. Was not a issue a year and half ago.
    Not that critical, though I find FurViewer is quite handy for authoring a hair objects before importing into Unity.

    PS. Currently working on a fur objects for your creature assets
     
    Last edited: May 13, 2019
  46. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    908
    omg awesome :eek::)
     
  47. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    146
    I've bought the forest animals pack and I'm scripting a basic roar but I can't find a reference to stand.roar anywhere. It doesn't seem to have an ID and I don't know how to access it otherwise. Could you tell me what I'm missing here?

    Code (CSharp):
    1.     void Start()
    2.     {
    3.         GetComponent<Animal>().SetAction(12); // stand
    4.         StartCoroutine(RoarGo());
    5.     }
    6.  
    7.     IEnumerator RoarGo()
    8.     {
    9.         yield return new WaitForSeconds(3);
    10.         GetComponent<Animal>().SetAction(?); // what should go here?
    11.     }
     
  48. conan222

    conan222

    Joined:
    Dec 15, 2018
    Posts:
    26
    Hi, I have your Poly Art Deer 3D model for Unity but am unable to work out how to incorporate the deer into my own scene.

    I've studied the AI demo scene and see that the deer follow waypoints but even if I copy the terrain, elk and waypoints into my own scene the elk just stays in one spot. Could you please give me any advice on how I can make an elk run in my own scene following some sort of path that goes right in front of the camera ? I'm using Unity 2018.3.3f1 (64-bit).

    Thanks. Andrew
     
  49. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    1,594
    Code (CSharp):
    1.     void Start()
    2.     {
    3.         GetComponent<Animal>().SetAction(12); // stand
    4.         StartCoroutine(RoarGo());
    5.     }
    6.  
    7.     IEnumerator RoarGo()
    8.     {
    9.         yield return new WaitForSeconds(3);
    10.         GetComponent<Animal>().SetJump(); // **Try this**
    11.     }
     
    mandisaw and JohnnyFactor like this.
  50. Hoorza

    Hoorza

    Joined:
    May 8, 2016
    Posts:
    20
    Hi all. Malbers great assets! Using your foxes for our Sheepy project. Since I have updated Unity to 2019.1 I get warnings about the obsolete API, namely:

    Code (CSharp):
    1.  
    2. MalbersAnimations\Common\Scripts\Effects\Editor\EffectManagerEditor.cs(234,107): warning CS0618: 'PrefabUtility.GetPrefabObject(Object)' is obsolete: 'Use GetPrefabInstanceHandle for Prefab instances. Handles for Prefab Assets has been discontinued.'
    3.  
    4. Assets\MalbersAnimations\Common\Scripts\Effects\Editor\EffectManagerEditor.cs(235,107): warning CS0618: 'PrefabUtility.GetPrefabObject(Object)' is obsolete: 'Use GetPrefabInstanceHandle for Prefab instances. Handles for Prefab Assets has been discontinued.'
    5.  
    6. Assets\MalbersAnimations\Common\Scripts\Effects\Editor\EffectManagerEditor.cs(236,119): warning CS0618: 'PrefabUtility.GetPrefabObject(Object)' is obsolete: 'Use GetPrefabInstanceHandle for Prefab instances. Handles for Prefab Assets has been discontinued.'
    7.  
    I have spent most of the day trying to change the code to the new API according to Unity documentation but I suck at more complex code still. Did you find by any chance with what those lines have to be replaced with so it doesn't throw those three warnings?

    Any help will be appreciated, it is a long project and I do not want to find my self stuck in a half a year or so trying to change so much more to make it work

    Thanks a lot!
     
    Malbers likes this.