Gorilla.Physics

Unit Gorilla.Physics.pas

Classes

Records

Enumerations

Constants

    TGorillaPhysicsBodyType

    enum TGorillaPhysicsBodyType = ( 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.

    TGorillaPhysicsColliderPrefab

    Ancestors

    Members

    Fields

    Methods

    Properties

    TGorillaPhysicsColliderPrefabs

    A designtime helper to pre-register colliders. On physics activation those predefined colliders will be registered.

    Ancestors

    Members

    TGorillaPhysicsSystem

    User component for physics computation. The Gorilla physics system uses internally the Q3 Physics Engine.

    Ancestors

    Members

    Fields

    Methods

    Properties