Gorilla.Physics.Q3.Body

Unit Gorilla.Physics.Q3.Body.pas

Classes

Records

Enumerations

  • enum  TQ3BodyType  = ( eStaticBody, eDynamicBody, eKinematicBody ) ;
  • enum  TQ3BodyState  = ( eAwake, eActive, eAllowSleep, eIsland, eStatic, eDynamic, eKinematic, eLockRotAxisX, eLockRotAxisY, eLockRotAxisZ, eLockMoveAxisX, eLockMoveAxisY, eLockMoveAxisZ ) ;

Constants

    Mics. types

    • type PQ3BodyDef = pointer to TQ3BodyDef;

TQ3BodyType

enum TQ3BodyType = ( eStaticBody, eDynamicBody, eKinematicBody ) ;

Type of body (static, dynamic or kinematic)

Remarks

A body is defined by one of these 3 kinds.

Static bodies will not be move or influenced by mass and impulses. Use this type for defining a plane / floor.

Dynamic bodies will move, handle forces influenced by mass and impulses. Use this type by default for any kind of physics-engine handled instances.

Kinematic bodies will be moved, but will not be influenced by mass and impulses. Use this type as an alternative to dynamic bodies.

Static bodies have no Rigidbody component attached to them, so the physics engine does not consider them to be moving. (Avoid moving these frequently or you'll violate that expectation) Use static colliders for level geometry like the ground and immovable walls, or stationary trigger volumes. Static colliders on their own won't set off trigger/collision messages, unless there's a Rigidbody on the other participant. Dynamic bodies have a Rigidbody component attached to them and their eKinematic flag is not set. These objects move at the whims of physics according to their velocities/angular velocities and the forces/torques and collision impacts exerted on them. The physics engine takes responsibility for resolving their collisions with static, kinematic, and other dynamic objects and rebounding them as needed. Use these for basic physics objects you want to be able to stack & topple and have them behave plausibly with minimal intervention, or for objects that you want to steer in a physics-focused way, like a rocketship. Kinematic bodies have a Rigidbody component with a set eKinematic flag. This tells the physics engine "this object moves, but I'll handle that part" — the kinematic object will process collisions with other rigidbodies, but only dynamic objects will automatically react by bouncing away, and cause messages to be sent. The kinematic object itself won't move except how you tell it to with MovePosition or MoveRotation — its velocity won't automatically integrate each timestep. Use this for objects that you want to control in ways that don't behave like simple physics bodies — like a bipedal character controller or highly custom vehicle controls. Use physics queries like overlap checks and shape casts to scan for collisions preemptively, since they won't stop your object automatically.

TQ3BodyState

enum TQ3BodyState = ( eAwake, eActive, eAllowSleep, eIsland, eStatic, eDynamic, eKinematic, eLockRotAxisX, eLockRotAxisY, eLockRotAxisZ, eLockMoveAxisX, eLockMoveAxisY, eLockMoveAxisZ ) ;

State of body

Remarks

A body can handle multiple states, like information about the body-type, if it's awake or if an axis is locked.

TQ3Body

Physics Ridid Body

Remarks

A single body instance can handle multiple colliders (boxes). So you can group similar elements and reduce cpu usage.

Ancestors

Members

Fields

Methods

Properties