phent_getvelocity (ENTITY* entity, VECTOR* OutVelocity, VECTOR* PointLocal
);
Retrieve the velocity vector at PointLocal. If PointLocal is (0,0,0),
this returns the linear velocity of the object. Otherwise it's a combination of
linear and angular velocity at the given distance from the center.
Parameters:
| entity |
the entity to be affected |
| OutVelocity |
will be set to the velocity of the point |
| PointLocal |
point to be sampled in entity coordinates, i.e. relative to the object's
position and orientation. |
Returns:
1 if successful, 0 otherwise.
Speed:
Medium
Edition:
C P
Example:
phent_getvelocity(my, temp, nullvector);
vec_inverse(temp);
vec_scale(temp,0.5);
phent_addcentralforce(my, temp);
See also:
phent_getbounds