Formula to obtain player speed for diagonal move?
Hello -
How do I obtain the player's (or any other object, for that matter) speed when moving diagonally? I believe it has to use linear velocity for x and y, but I can't figure out how they are used in a formula.
Thanks, regards.
Comments
Nevermind.
a2 + b2 = c2
or
ObjectSpeed = sqrt( LinearVelocityXˆ2 + LinearVelocityYˆ2 )
Or, you could use the Magnitude function.
I think that would give the same result.
Best,