|
This function is only relevant for the way collision detection functions work.
The function is used for making collision detection checks that exclude all dynamic objects
For example, we might use STATE_engine_is_movement_possible() to measure the altitude of an aeroplane to the ground
(We take the plane location and the same point just with a very low Z value to be used as a point below the plane
then we call STATE_engine_is_movement_possible() and check collision between those two points)
For the matter of this check we do not care for the dynamic objects in the world and above all we don't want
to get wrong altitude measurment if there is any dynamic object between the our plane and the ground)
Calling STATE_engine\object_is_movement_possible() after calling STATE_engine_ignore_dynamic_objects_for_collision_detection(YES)
Will have the same effect as the following commands
disable_all_objects_that_are_not_currently_disabled()
STATE_engine_is_movement_possible()
enable_objects_that_were_disabled() restore the enabled objects
The default is NO, which means that all the non-disabled objects are included in collision detection tests
Among the collision detection functions that are influenced by STATE_engine_ignore_dynamic_objects_for_collision_detection() are:
STATE_engine\object_is_movement_possible(), STATE_engine_2D_point_to_3D(), STATE_engine_get_object_at_point_2D().
STATE_engine_get_polygon_at_point_2D(), STATE_object_drop_down() and other functions that is sensing the shape of the world
and that its result is dependent on the shape of the world
Return value:
return the previous state (YES or NO)
Example:
int previous_state=STATE_engine_ignore_dynamic_objects_for_collision_detection(YES);
some code here ...
restore previous state
STATE_engine_ignore_dynamic_objects_for_collision_detection(previous_state);
|