phent_addcentralforce ( ENTITY*, VECTOR* vForce );

A linear force is applied to the entity's center of mass during the following frame cycle. When there is no gravity and no damping, the entity will just accelerate along the direction given by vecForce, which is independent of the body's current orientation.

Parameters:

ENTITY* Entity to be affected
vForce Vector determining the force to be exerted on the entity at its center of mass

Returns:

1 if successful, 0 otherwise.

Remarks:

Speed:

Fast

Example:

ph_setgravity( nullvector );
phent_setmass( my, 10 );
phent_setdamping (my, 0 );
// now my will continue to move along the x axis forever, with constant speed
phent_addcentralforce( my, vector(50,0,0));

See also:

phent_addforcelocal, phent_addtorquelocal, phent_addforceglobal, phent_addtorqueglobal, phent_addvelcentral, phent_addvellocal
► latest version online