[SOLVED] Check if object is moving

Hi All,

I’ve created a navmesh for my NPC character and want him to move towards a target. This I’ve managed to do. However, I also want it to play a walk cycle when he is moving towards it. What’s the best way to:

Check if he’s moving,
Check his movement direction,
Play a walking animation based on his speed and direction.

Ideally I’d like to do this with nodes


Hi. You might be interested in this demo:

1 Like

Thanks @rpaladin,

That example is practically what I was looking for. It doesn’t use logic nodes, but a bundled script called “Character” in the “Traits” panel on the armature. For future reference you can add this to your armature and edit the script. Change “var actionIdle” and “var actionMove” strings to your preferred idle and walk animation names.

1 Like