Hi!

I'm having an issue trying to animate NPCs in events outside battles.

Right now, characters movement animations work fine for combatants in battle and for the player game object outside battles. I use Mecanim animations with Auto Parameters that set the speed of the game object in Parameters, and an Auto Rotation Parameter that sets the Y Rotation value into a Full Degree Parameter. This way, my combatant's game objects's sprites (moving in a 3D environment) always know what sprite to show (depending of the Y rotation) and automatically start the walking animation when speed is above 0.

However, I'm unable to make my NPC animate like that, even if they have the exact same Game Objects as my combatants. I think the Auto Parameters aren't automatically set to my NPC Game Objects.

I've been able to make the NPCs move correctly with schematics, using the ''Play Mecanim Animation'' node, but having to manually set, activate and deactivate all parameters and use wait nodes to time the exact moment I need to set/activate/deactivate parameters is very complicated when I have a more complex scene with quite a few NPCs.

So my question is: is there a way to have NPCs automatically animate using the Auto Parameters, like the combatants in battles and the player character?

Thanks!
  • The easiest way is to ... make the NPCs combatants :)
    You can add a combatant to any game object in your scene using an Add Combatant component.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Omg lol... I didn't think of that! I looked for a while for a component to add to my NPCs, but I never would have thought to add a combatant component to an element outside a battle! But, it does make sense, considering all the Mecanim setup in Makinom is made for combatants!!

    Thanks, you saved my day :)
Sign In or Register to comment.