|
Move an object around a given point.
Parameters:
object_handle [in]:
The object that will move around the given point
angle [in]:
90 for example will cause the object to complete quarter of a circle around
the given point. -90 the same just in the opposite direction
axis [in]:
can be one of the three: X_AXIS, Y_AXIS or Z_AXIS
Specify how the object will circle around the point
For example a car circling in a roundabout is circling
around the world Z axis.
rotation_center [in]:
To point to circle around.
Example:
double world_center[3]={0,0,0};
STATE_object_rotate_around_point(my_plane, 0.2, Z_AXIS, world_center);
Remarks:
Note that there are several functions for rotating an object. Here are some of them
and help when to use what.
1) Rotation around the object center
If you need to turn/rotate an object around its center (for example a propeller of an helicopter)
then use one STATE_object_rotate_x/y/z()
2) If you need to rotate an object around a point in the object body
for example to turn a door around its hinge then use
STATE_object_rotate_x/y/z() together with STATE_object_set_rotation_center()
3) If you need to turn an object around a point in the world.
for example earth circling around the sun.
in this case use STATE_object_rotate_around_point()
See also:
STATE_object_rotate_x(), STATE_object_rotate_y(), STATE_object_rotate_z()
STATE_object_rotate_x_radians(), STATE_object_rotate_y_radians(), STATE_object_rotate_z_radians()
STATE_object_rotate_around_point()
STATE_object_set_rotation_center()
STATE_object_rotate_including_sons()
|