phent_addvellocal(ENTITY*, VECTOR* vecSpeed, VECTOR* vecPos);

phent_addvelglobal(ENTITY*, VECTOR* vecSpeed, VECTOR* vecPos);

Adds linear and angular velocity to the specified entity, at the position given by the vecPos vector in local (entity) or global (world) coordinates. The vecSpeed vector is independent of the object's current orientation.

Parameters:

ENTITY* Entity to be affected.
vecSpeed Speed vector
vecPos

Position where the speed is added.

Returns:

1 if successful, 0 otherwise.

Speed:

Fast

Remarks:

Example:

ph_setgravity( nullvector );
phent_setmass( my, 10 );
phent_setdamping (my, 0 );
phent_addvellocal( my, vector(50,0,0), vector(100,0,0) );

See also:

phent_addforcelocal, phent_addtorquelocal, phent_addforceglobal, phent_addtorqueglobal, phent_addvelcentral

► latest version online