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.
Force accelerates entities according to the pX_setforcemode function.
If you want to accelerate the entity to a certain speed regardeless of the frame rate, use pXent_addvelcentral, instead.
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 );
pXent_addforcelocal, pX_selectgroup, pXent_addforceglobal, pXent_addtorquelocal, pXent_addvelcentral, pXent_addvellocal, pX_setforcemode