pXent_addtorquelocal ( entity, VECTOR* vecTorque );

Torque ("angular force") will be applied to the specified entity. No linear movement is imparted upon the object, it will just change its rotation. The torque vector can be visualized as the axis of the desired rotation, and the magnitude of this vector determines the acceleration, e.g. (0,0,10) will make an object spin around its z-axis.

Parameters:

entity Registered entity pointer (Actor)
vecTorque Vector determining the torque to be exerted, relative to the object's orientation.

 

Returns:

1 if successful, 0 otherwise.

Speed:

Fast

Example:

pXent_addtorquelocal(my, vector(0,0,10*time_step));

See also:

pXent_addforceglobal, pXent_addtorqueglobal, pXent_addforcecentral