Game Development Community

Tourque X object velocity

by Henry Garle · in Torque X 2D · 10/18/2007 (9:09 am) · 4 replies

Ok, so ive found the "normal" X and Y velocity commands but is there a command such as setLinearVelocityPolar which also takes into account a rotation offset? Right now the only real way i can think of doing it is just mapping each angle (Every 5 degree's) to a set of x and Y co'rds but thats so incredibly messy. Is the function there and ive just missed it?

Henry

#1
10/18/2007 (10:55 am)
Can you accomplish the same thing by setting the RotationalInertia property (the rotational moment of intertia) within the T2DPhysicsComponent attached to the scene object, in addition to setting the VelocityX and VelocityY? I think that might produce the same results.

John K.
#2
10/18/2007 (2:15 pm)
There dosent seem to be a property for that :(
#3
10/18/2007 (2:57 pm)
...

Vector2 velocity = T2DVectorUtil.VectorFromAngle(degrees) * magnitude;

;)
#4
10/19/2007 (1:17 am)
Sorry, it was 2AM and i was very tired. Thanks for the help ;)

Henry