pXent_setvelocity
( entity, VECTOR* speed )
Sets
the linear velocity of a dynamic actor.
Parameters:
entity |
registered Entity pointer (Actor) |
speed
|
vector that defines the linear velocity of the
actor. |
Returns:
Nonzero if successful, 0
otherwise.
Remarks:
- For
linear velocity, note that it is the velocity of the actor's center
of mass you set. If this does not coincide with the origin of the
actor's frame, then the velocity of the actor frame may be
different, if the actor is also rotating.
- Note
that if you continuously set the velocity of an actor yourself,
forces such as gravity or friction will not be able to manifest
themselves, because forces directly influence only the
velocity/momentum of an actor.
- This
call wakes the actor if it is sleeping.
Speed:
Fast
Example:
pXent_setvelocity(my, vector(10,0,0)); // set linear velocity in X direction.
See also:
pXent_setangvelocity,
pXent_setposition