Settings Class |
public static class Settings
The Settings type exposes the following members.
| Name | Description | |
|---|---|---|
| MixFriction | Friction mixing law. Feel free to customize this. | |
| MixRestitution | Restitution mixing law. Feel free to customize this. |
| Name | Description | |
|---|---|---|
| AABBExtension | This is used to fatten AABBs in the dynamic tree. This allows proxies to move by a small amount without triggering a tree adjustment. This is in meters. | |
| AABBMultiplier | This is used to fatten AABBs in the dynamic tree. This is used to predict the future position based on the current displacement. This is a dimensionless multiplier. | |
| AllowSleep | Enable/Disable sleeping | |
| AngularSleepTolerance | A body cannot sleep if its angular velocity is above this tolerance. | |
| AngularSlop | A small angle used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant. | |
| AutoClearForces | By default, forces are cleared automatically after each call to Step. The default behavior is modified with this setting. The purpose of this setting is to support sub-stepping. Sub-stepping is often used to maintain a fixed sized time step under a variable frame-rate. When you perform sub-stepping you should disable auto clearing of forces and instead call ClearForces after all sub-steps are complete in one pass of your game loop. | |
| Baumgarte | This scale factor controls how fast overlap is resolved. Ideally this would be 1 so that overlap is removed in one time step. However using values close to 1 often lead to overshoot. | |
| ContinuousPhysics | Enable/Disable Continuous Collision Detection (CCD) | |
| EnableDiagnostics | Enabling diagnistics causes the engine to gather timing information. You can see how much time it took to solve the contacts, solve CCD and update the controllers. NOTE: If you are using a debug view that shows performance counters, you might want to enable this. | |
| Epsilon | ||
| LinearSleepTolerance | A body cannot sleep if its linear velocity is above this tolerance. | |
| LinearSlop | A small length used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant. | |
| MaxAngularCorrection | The maximum angular position correction used when solving constraints. This helps to prevent overshoot. | |
| MaxFloat | ||
| MaxGJKIterations | Defines the maximum number of iterations made by the GJK algorithm. | |
| MaxLinearCorrection | The maximum linear position correction used when solving constraints. This helps to prevent overshoot. | |
| MaxManifoldPoints | The maximum number of contact points between two convex shapes. DO NOT CHANGE THIS VALUE! | |
| MaxPolygonVertices | The maximum number of vertices on a convex polygon. | |
| MaxRotation | The maximum angular velocity of a body. This limit is very large and is used to prevent numerical problems. You shouldn't need to adjust this. | |
| MaxRotationSquared | ||
| MaxSubSteps | Maximum number of sub-steps per contact in continuous physics simulation. | |
| MaxTOIContacts | Maximum number of contacts to be handled to solve a TOI impact. | |
| MaxTranslation | The maximum linear velocity of a body. This limit is very large and is used to prevent numerical problems. You shouldn't need to adjust this. | |
| MaxTranslationSquared | ||
| PolygonRadius | The radius of the polygon/edge shape skin. This should not be modified. Making this smaller means polygons will have an insufficient buffer for continuous collision. Making it larger may create artifacts for vertex collision. | |
| PositionIterations | The number of position iterations used in the solver. | |
| TimeToSleep | The time that a body must be still before it will go to sleep. | |
| TOIPositionIterations | The number of position iterations in the TOI solver | |
| TOIVelocityIterations | The number of velocity iterations in the TOI solver | |
| UseConvexHullPolygons | If true, it will run a GiftWrap convex hull on all polygon inputs. This makes for a more stable engine when given random input, but if speed of the creation of polygons are more important, you might want to set this to false. | |
| VelocityIterations | The number of velocity iterations used in the solver. | |
| VelocityThreshold | A velocity threshold for elastic collisions. Any collision with a relative linear velocity below this threshold will be treated as inelastic. |