|
Copies the speed, the location and the force of one object to another.
This function is useful when we want to change the shape of an object with another object
The function also makes sure that object with chase type CHASE_PHYSICS will have a smooth transition
from one to another.
Remarks
The function could be used also when the chase type is not CHASE_PHISYCS or when there is no chase type at all
though the function real need is when CHASE_PHYSICS is used.
When CHASE_PHYSICS is used one should use this function instead of writing one own version (for coping the location and speed)
because this function also synchronize the timing for maximum smooth transition.
Example:
lets say we have an airplane that was hit by a missile and now we want to
replace the airplane shape with a shape of an airplane which is a bit burnt and has a hole.
STATE_object_disable(good_airplane_handle); Disable the intact airplane
STATE_object_enabled(burnt_airplane_handle); Enable the damaged airplane. From now on, this object will be used.
STATE_object_copy_physics(burnt_airplane_handle, good_airplane_handle); set the location and other properties of
damaged jet so that we will have a smooth transition between the two.
|