phent_addforcelocal ( entity, vecForce, vecPoint );

Force and torque (=“angular force”) will be applied to the specified entity, at local position vecPoint. This allows applying a constant force at a constant point without having to worry about the objects current orientation. This is suitable for flight sims where the propulsion always points along a body relative direction (forward) and is also applied at a body relative position, say at the plane's tail. It is not checked whether the position is actually inside the entity, so by choosing a vecPoint to lie far away from the entity, you can give it a strong spin. If on the other hand vecPoint is exactly at the object’s center of mass, no spinning will occur (consider using phent_addcentralforce in this case). phent_addforcelocal gives the same result as calling both phent_addcentralforce and phent_addtorquelocal with the same parameters. Force is defined as the product of mass and acceleration. Thus for higher acceleration or heavier entities you have to use a stronger force.

Parameters:

entity the entity to be affected
vecForce a vector determining the force to be exerted on entity (relative to body's orientation)
vecPoint a vector specifying the local point where vecForce is applied (relative to body position)

Returns:

1 if successful, 0 otherwise.

Remarks:

Speed:

fast

Edition:

 C   P 

Example:

phent_addforcelocal(my, vector(10,0,0), nullvector);

See also:

phent_addforceglobal, ph_selectgroup