Global physics settings which are part of the SimulationConfig. More...
Public Attributes | |
bool | AllowCCD = false |
Allows CCD to be performed if the Physics Body has CCD enabled on its Config flags. Default is false . More... | |
Boolean | AllowSleeping = false |
Toggles the detection of physics bodies in a sleeping state. If allowed, the simulation will skip forces and velocity integrations and collisions detection on physics bodies while they are asleep. Default is false . More... | |
FP | AngularSleepToleranceInRad = FP._2 * FP.Deg2Rad |
Amount of angular velocity below which a physics body might be considered as standing still for sleeping detection. More... | |
FP | CCDAngularVelocityThreshold = FP._3 |
If CCD is allowed, it will be performed on all Physics Bodies that have it enabled and have a angular velocity magnitude above this threshold. Default is 3. More... | |
FP | CCDDistanceTolerance = FP.EN3 |
The absolute distance value below which the Physics Bodies under CCD check can be considered as touching. Default is 0.001. More... | |
FP | CCDLinearVelocityThreshold = FP._3 |
If CCD is allowed, it will be performed on all Physics Bodies that have it enabled and have a linear velocity magnitude above this threshold. Default is 3. More... | |
Int32 | DefaultBucketsCapacity = DEFAULT_BUCKETS_CAPACITY |
The initial amount of buckets used in the physics broad phase to solve collisions in parallel. Use a reasonable amount according to how many colliders you have. The default value is 16. More... | |
AssetRef< CharacterController2DConfig > | DefaultCharacterController2D |
The default CharacterController2DConfig asset used when initializing a CharacterController2D component with no other config specified More... | |
AssetRef< CharacterController3DConfig > | DefaultCharacterController3D |
The default CharacterController3DConfig asset used when initializing a CharacterController3D component with no other config specified More... | |
Int32 | DefaultEntriesCapacity = DEFAULT_ENTRIES_CAPACITY |
The initial number of supported entities when a scene is initialized. Memory for more entities will be allocated if necessary. The smallest value is 32. More... | |
Int32 | DefaultHitCollectionItemsCapacity = DEFAULT_HITCOLLECTION_ITEMS_CAPACITY |
The initial number of memory allocated for items in the Physics3D.HitCollection3D. The default value is 32. More... | |
Int32 | DefaultIslandsCapacity = DEFAULT_ISLANDS_CAPACITY |
The default number of islands of entities that are in contact in the physics update. Memory for more islands will be allocated if necessary. The smallest value is 16. More... | |
Int32 | DefaultJointsCapacity = DEFAULT_JOINTS_CAPACITY |
The initial number of supported joints when a scene is initialized. Memory for more joints will be allocated if necessary. The default value is 128. This value can be set to 0 if not using Joints. More... | |
Int32 | DefaultManifoldsCapacity = DEFAULT_MANIFOLDS_CAPACITY |
The initial number of manifolds for collision interactions per bucket when a scene is initialized. Memory for more manifolds will be allocated if necessary. The default value is 1024. More... | |
AssetRef< PhysicsMaterial > | DefaultPhysicsMaterial |
The default PhysicsMaterial asset used when initializing a 2D or 3D physics collider component with no other material specified More... | |
Int32 | DefaultQueriesCapacity = DEFAULT_QUERIES_CAPACITY |
The initial number of supported broad-phase queries per frame when a scene is initialized. Memory for more queries will be allocated if necessary. The smallest value is 64. More... | |
Int32 | DefaultQueryItemsCapacity = DEFAULT_QUERY_ITEMS_CAPACITY |
The initial number of query manifolds for collision interactions per bucket when a scene is initialized. Memory for more manifolds will be allocated if necessary. The default value is 1024. More... | |
Int32 | DefaultStaticsCapacity = DEFAULT_STATICS_CAPACITY |
The initial number of supported static entities when a scene is initialized. Memory for more entities will be allocated if necessary. The smallest value is 64. More... | |
FPVector3 | Gravity = new FPVector3(FP._0, -FP._10, FP._0) |
Define the gravity of the physics simulation. For a 2D world set the y-component to zero. Default is (0, -10, 0). More... | |
Int32[] | LayerMatrix |
The collision matrix of the layers recognized by the Quantum simulation. Can be imported from Unity's layer matrix on the editor. More... | |
String[] | Layers |
The collision layer names recognized by the Quantum simulation. Can be imported from Unity layers on the editor. More... | |
FP | LinearSleepTolerance = FP._0_02 |
Amount of linear velocity below which a physics body might be considered as standing still for sleeping detection. Default is 0.02. More... | |
int | MaxRootFindingIterations = 32 |
The maximum number of iterations performed when computing the point in time when the distance between two Physics Bodies in a given separation axis is below the tolerance. Default is 32. More... | |
int | MaxTimeOfImpactIterations = 16 |
The maximum number of iterations performed by the CCD algorithm when computing the time of impact between two Physics Bodies. Default is 16. More... | |
FP | MinAngularIntegration = 0 |
A physics body's angular velocity component (x, y or z in the 3D Physics and the amount relative to the vertical axis in the 2D Physics) is rounded to 0 if its absolute value is smaller than this minimum angular integration. A small amount can increase the physics simulation stability and improve sleep detection. Default is 0. More... | |
FP | MinContactInverseMass = FP.EN4 * FP._5 |
When Physics Bodies have a very large Mass or Inertia, the inverse value of the perceived mass in contact points as computed by the Physics Solver might get very small and close to zero. Under such conditions, rounding errors become very significant and this can often be translated into impulse spikes. This setting functions as a minimum threshold to this inverse mass value, below which the value is clamped. Set to 0 to never clamp. More... | |
FP | MinLinearIntegration = 0 |
A physics body's linear velocity component (x, y or z, the latter only in the 3D Physics) is rounded to 0 if its absolute value is smaller than this minimum linear integration. A small amount can increase the physics simulation stability and improve sleep detection. Default is 0. More... | |
FP | PenetrationAllowance = FP._0_01 |
Allow a certain degree of penetration to improve the stability of the physics simulation. Default is 0.01. More... | |
FP | PenetrationCorrection = FP._0_50 |
How much of the exceeding penetration (above allowance) should be corrected in a single frame. 0 = no correction, 1 = full correction. Default is 0.5. More... | |
Int32 | PositionSolverIterations = 2 |
The physics position constraint solver (used on Joint, for instance) runs in sub-steps to improve quality. Default is 2. More... | |
FP | ShapeCastHardTolerance = FP.EN3 |
A GJK iteration result below this threshold is acceptable as a finishing condition. In general, increasing the hard tolerance decreases the accuracy of the result, but reduces computational cost by requiring less iterations. Default is 0.01. More... | |
Int32 | ShapeCastMaxIterations = 16 |
The max number of iterations performed by the GJK algorithm while searching for a solution below ShapeCastHardTolerance. Default is 16. More... | |
Int32 | ShapeCastMinIterations = 4 |
The minimum number of iterations performed by the GJK algorithm if the QueryOptions.ComputeDetailedInfo query option is enabled. More... | |
FP | ShapeCastSoftTolerance = FP._0_05 |
A GJK resolution that fails to find an acceptable result below ShapeCastHardTolerance after ShapeCastMaxIterations will still return positive if the best solution found is below this soft threshold. Default is 0.05. More... | |
Int32 | SimplexMaxBitShift = 2 |
The GJK Voronoy Simplex space is scaled by progressively by shifting points' raw values up to this max value when the current instance becomes affine dependent, avoiding degenerate cases due to limited precision. Default is 2. More... | |
Int32 | SimplexMinBitShift = 0 |
Scales the GJK Voronoy Simplex space by shifting points' raw values. Consider increasing if working with small-scaled shapes. Default is 0. More... | |
FP | SleepTimeSec = FP._0_50 |
For how many seconds a physics body should stay under the linear and angular velocity sleeping thresholds before being put in a sleeping state. Default is 0.5. More... | |
Int32 | SolverIterations = 4 |
The physics collision solver runs in sub-steps to improve quality. Default is 4. More... | |
ConstraintsSolverType | SolverType = ConstraintsSolverType.HybridJacobiGaussSeidel |
Defines which solver algorithm will be used by the Physics Engines. More... | |
Boolean | UseAngularVelocity = true |
Lock the angular velocity for dynamic bodies. Disabling this option leads not only to faster but also to more stable physics simulation for games that can use it. Default is true . More... | |
Boolean | UseJoints = true |
Enable the use of joints in the physics engines. If joints are not used, this can be disabled to reduce overhead. Default is true . More... | |
PhysicsNativeLib | UsePhysicsNativeLib = PhysicsNativeLib.Disabled |
Obsolete option that enable the use of native physics libraries. The property has no function for SDK 3.0. More... | |
Boolean | UseVerticalTransform = true |
Toggle the use of a vertical transform component for 2.5D worlds that have a simplified concept of height. Default is true . More... | |
Global physics settings which are part of the SimulationConfig.
Define the gravity of the physics simulation. For a 2D world set the y-component to zero. Default is (0, -10, 0).
ConstraintsSolverType Quantum.PhysicsCommon.Config.SolverType = ConstraintsSolverType.HybridJacobiGaussSeidel |
Defines which solver algorithm will be used by the Physics Engines.
PhysicsNativeLib Quantum.PhysicsCommon.Config.UsePhysicsNativeLib = PhysicsNativeLib.Disabled |
Obsolete option that enable the use of native physics libraries. The property has no function for SDK 3.0.
Int32 Quantum.PhysicsCommon.Config.SolverIterations = 4 |
The physics collision solver runs in sub-steps to improve quality. Default is 4.
Int32 Quantum.PhysicsCommon.Config.PositionSolverIterations = 2 |
The physics position constraint solver (used on Joint, for instance) runs in sub-steps to improve quality. Default is 2.
Boolean Quantum.PhysicsCommon.Config.UseJoints = true |
Enable the use of joints in the physics engines. If joints are not used, this can be disabled to reduce overhead. Default is true
.
Boolean Quantum.PhysicsCommon.Config.UseAngularVelocity = true |
Lock the angular velocity for dynamic bodies. Disabling this option leads not only to faster but also to more stable physics simulation for games that can use it. Default is true
.
Boolean Quantum.PhysicsCommon.Config.UseVerticalTransform = true |
Toggle the use of a vertical transform component for 2.5D worlds that have a simplified concept of height. Default is true
.
Allow a certain degree of penetration to improve the stability of the physics simulation. Default is 0.01.
How much of the exceeding penetration (above allowance) should be corrected in a single frame. 0 = no correction, 1 = full correction. Default is 0.5.
FP Quantum.PhysicsCommon.Config.MinLinearIntegration = 0 |
A physics body's linear velocity component (x, y or z, the latter only in the 3D Physics) is rounded to 0 if its absolute value is smaller than this minimum linear integration. A small amount can increase the physics simulation stability and improve sleep detection. Default is 0.
FP Quantum.PhysicsCommon.Config.MinAngularIntegration = 0 |
A physics body's angular velocity component (x, y or z in the 3D Physics and the amount relative to the vertical axis in the 2D Physics) is rounded to 0 if its absolute value is smaller than this minimum angular integration. A small amount can increase the physics simulation stability and improve sleep detection. Default is 0.
When Physics Bodies have a very large Mass or Inertia, the inverse value of the perceived mass in contact points as computed by the Physics Solver might get very small and close to zero. Under such conditions, rounding errors become very significant and this can often be translated into impulse spikes. This setting functions as a minimum threshold to this inverse mass value, below which the value is clamped. Set to 0 to never clamp.
Int32 Quantum.PhysicsCommon.Config.SimplexMinBitShift = 0 |
Scales the GJK Voronoy Simplex space by shifting points' raw values. Consider increasing if working with small-scaled shapes. Default is 0.
Int32 Quantum.PhysicsCommon.Config.SimplexMaxBitShift = 2 |
The GJK Voronoy Simplex space is scaled by progressively by shifting points' raw values up to this max value when the current instance becomes affine dependent, avoiding degenerate cases due to limited precision. Default is 2.
Int32 Quantum.PhysicsCommon.Config.ShapeCastMaxIterations = 16 |
The max number of iterations performed by the GJK algorithm while searching for a solution below ShapeCastHardTolerance. Default is 16.
Int32 Quantum.PhysicsCommon.Config.ShapeCastMinIterations = 4 |
The minimum number of iterations performed by the GJK algorithm if the QueryOptions.ComputeDetailedInfo query option is enabled.
A GJK iteration result below this threshold is acceptable as a finishing condition. In general, increasing the hard tolerance decreases the accuracy of the result, but reduces computational cost by requiring less iterations. Default is 0.01.
A GJK resolution that fails to find an acceptable result below ShapeCastHardTolerance after ShapeCastMaxIterations will still return positive if the best solution found is below this soft threshold. Default is 0.05.
Boolean Quantum.PhysicsCommon.Config.AllowSleeping = false |
Toggles the detection of physics bodies in a sleeping state. If allowed, the simulation will skip forces and velocity integrations and collisions detection on physics bodies while they are asleep. Default is false
.
For how many seconds a physics body should stay under the linear and angular velocity sleeping thresholds before being put in a sleeping state. Default is 0.5.
Amount of linear velocity below which a physics body might be considered as standing still for sleeping detection. Default is 0.02.
FP Quantum.PhysicsCommon.Config.AngularSleepToleranceInRad = FP._2 * FP.Deg2Rad |
Amount of angular velocity below which a physics body might be considered as standing still for sleeping detection.
bool Quantum.PhysicsCommon.Config.AllowCCD = false |
Allows CCD to be performed if the Physics Body has CCD enabled on its Config flags. Default is false
.
If CCD is allowed, it will be performed on all Physics Bodies that have it enabled and have a linear velocity magnitude above this threshold. Default is 3.
If CCD is allowed, it will be performed on all Physics Bodies that have it enabled and have a angular velocity magnitude above this threshold. Default is 3.
The absolute distance value below which the Physics Bodies under CCD check can be considered as touching. Default is 0.001.
int Quantum.PhysicsCommon.Config.MaxTimeOfImpactIterations = 16 |
The maximum number of iterations performed by the CCD algorithm when computing the time of impact between two Physics Bodies. Default is 16.
int Quantum.PhysicsCommon.Config.MaxRootFindingIterations = 32 |
The maximum number of iterations performed when computing the point in time when the distance between two Physics Bodies in a given separation axis is below the tolerance. Default is 32.
Int32 Quantum.PhysicsCommon.Config.DefaultEntriesCapacity = DEFAULT_ENTRIES_CAPACITY |
The initial number of supported entities when a scene is initialized. Memory for more entities will be allocated if necessary. The smallest value is 32.
Int32 Quantum.PhysicsCommon.Config.DefaultStaticsCapacity = DEFAULT_STATICS_CAPACITY |
The initial number of supported static entities when a scene is initialized. Memory for more entities will be allocated if necessary. The smallest value is 64.
Int32 Quantum.PhysicsCommon.Config.DefaultQueriesCapacity = DEFAULT_QUERIES_CAPACITY |
The initial number of supported broad-phase queries per frame when a scene is initialized. Memory for more queries will be allocated if necessary. The smallest value is 64.
Int32 Quantum.PhysicsCommon.Config.DefaultQueryItemsCapacity = DEFAULT_QUERY_ITEMS_CAPACITY |
The initial number of query manifolds for collision interactions per bucket when a scene is initialized. Memory for more manifolds will be allocated if necessary. The default value is 1024.
Int32 Quantum.PhysicsCommon.Config.DefaultHitCollectionItemsCapacity = DEFAULT_HITCOLLECTION_ITEMS_CAPACITY |
The initial number of memory allocated for items in the Physics3D.HitCollection3D. The default value is 32.
Int32 Quantum.PhysicsCommon.Config.DefaultBucketsCapacity = DEFAULT_BUCKETS_CAPACITY |
The initial amount of buckets used in the physics broad phase to solve collisions in parallel. Use a reasonable amount according to how many colliders you have. The default value is 16.
Int32 Quantum.PhysicsCommon.Config.DefaultIslandsCapacity = DEFAULT_ISLANDS_CAPACITY |
The default number of islands of entities that are in contact in the physics update. Memory for more islands will be allocated if necessary. The smallest value is 16.
Int32 Quantum.PhysicsCommon.Config.DefaultManifoldsCapacity = DEFAULT_MANIFOLDS_CAPACITY |
The initial number of manifolds for collision interactions per bucket when a scene is initialized. Memory for more manifolds will be allocated if necessary. The default value is 1024.
Int32 Quantum.PhysicsCommon.Config.DefaultJointsCapacity = DEFAULT_JOINTS_CAPACITY |
The initial number of supported joints when a scene is initialized. Memory for more joints will be allocated if necessary. The default value is 128. This value can be set to 0 if not using Joints.
AssetRef<PhysicsMaterial> Quantum.PhysicsCommon.Config.DefaultPhysicsMaterial |
The default PhysicsMaterial asset used when initializing a 2D or 3D physics collider component with no other material specified
AssetRef<CharacterController2DConfig> Quantum.PhysicsCommon.Config.DefaultCharacterController2D |
The default CharacterController2DConfig asset used when initializing a CharacterController2D component with no other config specified
AssetRef<CharacterController3DConfig> Quantum.PhysicsCommon.Config.DefaultCharacterController3D |
The default CharacterController3DConfig asset used when initializing a CharacterController3D component with no other config specified
String [] Quantum.PhysicsCommon.Config.Layers |
The collision layer names recognized by the Quantum simulation. Can be imported from Unity layers on the editor.
Int32 [] Quantum.PhysicsCommon.Config.LayerMatrix |
The collision matrix of the layers recognized by the Quantum simulation. Can be imported from Unity's layer matrix on the editor.