Appearance
Class: Settings
Tuning constants based on meters-kilograms-seconds (MKS) units.
Some tolerances are absolute and some are relative. Absolute tolerances use MKS units.
Constructors
Constructor
new Settings():
Settings
Returns
Settings
Properties
aabbExtension
staticaabbExtension:number=0.1
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
staticaabbMultiplier:number=2.0
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.
angularSleepTolerance
staticangularSleepTolerance:number
A body cannot sleep if its angular velocity is above this tolerance.
angularSlop
staticangularSlop:number
A small angle used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant.
baumgarte
staticbaumgarte:number=0.2
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.
lengthUnitsPerMeter
staticlengthUnitsPerMeter:number=1.0
You can use this to change the length scale used by your game.
For example for inches you could use 39.4.
linearSleepTolerance
staticlinearSleepTolerance:number=0.01
A body cannot sleep if its linear velocity is above this tolerance.
linearSlop
staticlinearSlop:number=0.005
A small length used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant.
maxAngularCorrection
staticmaxAngularCorrection:number
The maximum angular position correction used when solving constraints. This helps to prevent overshoot.
maxDistanceIterations
staticmaxDistanceIterations:number=20
Maximum iterations to find Distance.
maxLinearCorrection
staticmaxLinearCorrection:number=0.2
The maximum linear position correction used when solving constraints. This helps to prevent overshoot.
maxManifoldPoints
staticmaxManifoldPoints:number=2
The maximum number of contact points between two convex shapes. Do not change this value.
maxPolygonVertices
staticmaxPolygonVertices:number=12
The maximum number of vertices on a convex polygon. You cannot increase this too much because BlockAllocator has a maximum object size.
maxRotation
staticmaxRotation:number
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 Settings.
maxSubSteps
staticmaxSubSteps:number=8
Maximum number of sub-steps per contact in continuous physics simulation.
maxTOIContacts
staticmaxTOIContacts:number=32
Maximum number of contacts to be handled to solve a TOI impact.
maxTOIIterations
staticmaxTOIIterations:number=20
Maximum iterations to solve a TOI.
maxTranslation
staticmaxTranslation:number=2.0
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 Settings.
timeToSleep
statictimeToSleep:number=0.5
The time that a body must be still before it will go to sleep.
toiBaugarte
statictoiBaugarte:number=0.75
velocityThreshold
staticvelocityThreshold:number=1.0
A velocity threshold for elastic collisions. Any collision with a relative linear velocity below this threshold will be treated as inelastic.
Accessors
polygonRadius
Get Signature
get
staticpolygonRadius():number
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.
Returns
number