pXent_addforcecentral ( 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 vForce, which is independent of the body's current orientation.


entity registered Entity pointer (Actor)
vForce Vector determining the force to be exerted on the entity at its center of mass


1 if successful, 0 otherwise.





entity* myCrate;
pX_setgravity( nullvector );
pXent_setmass( myCrate, 10, 1);
pXent_setdamping (myCrate, 0 ,0);
temp.x= 50; temp.y= 0; temp.z= 0; 
// now myCrate will continue to move along the x axis forever, with constant speed
pXent_addforcecentral( myCrate, temp );

See also:

pXent_addforcelocal, pX_selectgroup, pXent_addforceglobal, pXent_addtorquelocal, pXent_addvelcentral, pXent_addvellocal, pX_setforcemode