I'm making a 2d side scrolling runner and using move towards with ignore vertical checked to make my character run non stop towards an empty game object "finish line"... jumping and whatnot along the way to avoid fail...

I have enemies that fire things at the runner, causing knockback...

I'd like to automate the animator using speed... but get speed 2d only shows when the character is jumping becauses move towards doesn't produce a velocity...

so two questions, both one side of a coin...

Is there a better option than move towards that would allow me switch animator states by speed?

Is there a way to still use move towards that would allow me to switch animator states by speed?

I would suggest that you get the speed of your gameobject and input that into your animator as a parameter then, inside your animator graph you can do all the animation switches. Check out the Unity Stealth character it's using this technic I described above.

I would suggest that you get the speed of your gameobject and input that into your animator as a parameter then, inside your animator graph you can do all the animation switches. Check out the Unity Stealth character it's using this technic I described above.

getting the speed should be done outside MoveTowards, there is a GetGameObjectSpeed on the Ecosystem. You should use this.

simulating key pressed is your call within your fsm, since you are using an action to get the axis, nothing prevents you to set the value yourself inside the result variable.

Bye,

Jean

thank you Jean... I got Get Game Object Speed off the ecosystem, and no matter the combination of use owner or a global variable for the object or self or world, it doesn't return any data for speed or speed vector when the object is moving