STATE_object_set_falling_from_track

 

 



/*
	Function for automatic falling from a track.
	--------------------------------------------
	Example of usage:
	Say we have a track for a runner on a road, if the track is not 100 percent precise
	meaning that some time the runner will be in the air and some times inside the ground.
	With these functions we can solve that problem.
	We give an offset for the track in the Z axis 
	so the track will be above the road. Now if "falling"
	is ON, the object will fall down till it reaches the
	the track.
	Another example:
	If we want to move the object on a terrain model
	very close to the ground. It will be very difficult to 
	calculate the exact track. Now we can define a very simple
	track like a basic square and "falling" will do the rest.

	NOTE: to use it directly from the wld file, add _FALLxx to the
	chase_type. for example CHASE_TRACK_AIRPLANE would become CHASE_TRACK_AIRPLANE_FALL17
	17 here is the height above ground that we want to fall.
  

   Calling this function will make the object fall down from
   its track till it reaches "height_above_ground" distance from the ground
   Here is an example for an ocasion that makes this function very useful:
  		If we have a terrain and we want a runner to run on a square track on this terrain then using
  		this function we can use a track with only 4 points (a square) that will be up in the air.
  		The engine will automatically place our runner at the right spot on the terrain.
   fall_through_dynamic_objects could be YES or NO. The idea here is that if for example we have a runner (human being)
   and the track is very high in the air then it might fall on the top of the airplanes so we would like it to fall through the planes on the ground
   if on the other hand there are cars on the ground we would like it to fall on the top of the cars and not to pass through.
   See also STATE_object_get_location_on_track_before_falling()

 

 

Go to page 1      Select API

 

Copyright © 2007 3DSTATE Corporation. www.3dstate.com