Hello
,
I have 3d object which has rigidbody and moves according to force.
I want to calculate speed of this object.
I tried this.entity.rigidbody.linearVelocity
but it is not working as expected.
How I can calculate object speed?
Thanks in Advance 
Hi @Ketan_ATA,
One common way to get the speed per frame (per physics simulation tick), is to use the length() property:
const speed = this.entity.rigidbody.linearVelocity.length();
That will give you the amount of space the object will traverse in the next simulation tick.
4 Likes
Is is possible to do the same with length() for an individual axis?
You can do that by taking the absolute value on any axis:
const speedX = Math.abs(this.entity.rigidbody.linearVelocity.x);
2 Likes