Hey guys,
Is it possible to get the speed of a physics object?
For example, the speed of a falling object or the speed of a object that get hit by another object and then change direction? I only want to return the speed (in numbers if possible... like pixels per second for example)
I am not sure if this is even possible...
Yes. object.physics.Velocity
That's the speed, negative means going towards left.
Develop games in your browser. Powerful, performant & highly capable.
object.physics.VelocityX and object.physics.VelocityY, and if you need overall velocity, use this expression:
distance(0, 0, object.physics.VelocityX, object.physics.VelocityY)