Class TPhysicsProperties
Unit
CastleTransform
Declaration
type TPhysicsProperties = class(TComponent)
Description
Configure physics simulation calculation.
Hierarchy
- TObject
- TPersistent
- TComponent
- TPhysicsProperties
Overview
Fields
Methods
|
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
Properties
Description
Fields
|
nested const DefaultAngularVelocityRK4Integration = false; |
This item has no description. |
|
nested const DefaultLinearVelocityRK4Integration = false; |
This item has no description. |
|
nested const DefaultFrequency = 60.0; |
This item has no description. |
|
nested const DefaultMaxPhysicsTicksPerUpdate = 5; |
This item has no description. |
|
nested const DefaultGravityStrength = 9.81; |
This item has no description. |
|
nested const DefaultContinuousCollisionDetection = true; |
This item has no description. |
Methods
|
constructor Create(AOwner: TComponent); override; |
This item has no description. |
|
destructor Destroy; override; |
This item has no description. |
Properties
|
property AngularVelocityRK4Integration: Boolean read FAngularVelocityRK4Integration write SetAngularVelocityRK4Integration default DefaultAngularVelocityRK4Integration; |
Use a more precise (but also more expensive) method for simulating angular velocity. The "RK4" refers to Runge–Kutta method.
|
|
property LinearVelocityRK4Integration: Boolean read FLinearVelocityRK4Integration write SetLinearVelocityRK4Integration default DefaultLinearVelocityRK4Integration; |
Use a more precise (but also more expensive) method for simulating linear velocity. The "RK4" refers to Runge–Kutta method.
|
|
property Frequency: Single read FFrequency write SetFrequency default DefaultFrequency; |
How often should the physics simulation run in a second. Larger values increase accuracy (up to a certain point), but also increase the CPU overhead.
|
|
property GravityStrength: Single read FGravityStrength write FGravityStrength default DefaultGravityStrength; |
Physics gravity is set using the -GravityUp vector (from main camera) multiplied with GravityStrength .
|
|
property MaxPhysicsTicksPerUpdate: Cardinal read FMaxPhysicsTicksPerUpdate write FMaxPhysicsTicksPerUpdate default DefaultMaxPhysicsTicksPerUpdate; |
Non-zero value avoids the "spiral of death" when the physics takes a long time to calculate.
When the value is zero, physics makes always as many steps as necessary, to advance the time by 1 / Frequency steps. This means that if physics takes a long time to calculate, next time it will take even longer time to calculate (it will need more steps), thus we have a "spiral of death" that leads to lower and lower FPS.
|
|
property ContinuousCollisionDetection: Boolean read FContinuousCollisionDetection write SetContinuousCollisionDetection default DefaultContinuousCollisionDetection; |
Should engine use continous collision detection (CCD).
|
|
property LayerCollisions: TCastleLayerCollisions read FLayerCollisions write FLayerCollisions; |
Which layers collide with each other.
|
|
property LayerNames: TCastleLayerNames read FLayerNames write FLayerNames; |
Name and a descriptions of layers.
|
Generated by PasDoc 0.16.0-snapshot.