|
pXent_setangvelocity ( entity, VECTOR* speed ); |
Sets the angular velocity vector of the actor. The angular velocity vector can be visualized as the axis of the desired rotation, and the magnitude of this vector determines the desired speed in degrees per second, e.g. (0,0,10) will make an object spin around the global z-axis with a speed of 10 degrees per second.
|
Parameters: |
|
entity |
registered Entity pointer (Actor) |
|
speed |
This vector defines the angular velocity of the actor. |
|
Returns: |
1 if successful, 0 otherwise.
|
Remarks: |
Setting a velocity large enough to carry an actor outside of the range of a float is a user error and might produce artifacts; this situation should be avoided.
Note that if you continuously set the angular velocity of an actor yourself, forces such as friction will not be able to rotate the actor, because forces directly influence only the velocity / momentum.
This call wakes the actor if it is sleeping.
|
Speed: |
Fast
pXent_setangvelocity(my, vector(10, 0, 0)); // set angular velocity in PAN rotation.