glscene

 

TGLDCEManager

Page history last edited by skinhat 4 yrs ago

Provides automatic collision detection with objects in a scene. Includes collisions with terrains and freeforms so it is possible to use it to walk over a terrain or Quake like map. Extra objects added to the scene will also become part of the collision detection so it is possible, for example, to have a Quake town then drop a TGLCube onto the town and both the town freeform and TGLCube will be included in the collision detection. Collisions are basically between static objects (eg a Quake map) and dynamic objects (eg a camera). Refer to the DCE Collision article for more information.

Important TGLDCEManager properties:

gravity:integer

The force of gravity applied to objects with dyamic DCE behaviour. Negative gravity will cause an object to move an object down until it collides with something.


worlddirection: TGLCoordinates

The direction DCE manager considers up. For example if the worlddirection is in the y direction and the gravity is -30 then an object with dynamic DCE behaviour will move in the negative y direction until it collides with another object.

Demo: CVS/Demos/behaviours/DCEDemo

Unit: GLDCE

Descends from TComponent.

Comments (0)

You don't have permission to comment on this page.