If Movement = True code (game engine)

Hey, is need a python code that is true if the object is moving in any direction. ´will be used in a game i am creating.

Many Thanks in advance

Moved from “Jobs > Volunteer Work” to “Game Engine > Game Engine Support and Discussion”

Try this blend-

It simply checks the linear velocity, and if its over 0 then the object is moving and a message is printed in the command console. In my example I restricted the code to detect only Y axis movement, but if you remove the [1] bit any moving will set it off.

Edit: Gah! Ninja’ed by Damutantman!

Attachments

Move.blend (474 KB)