Settings
Declaration
public static class tainicom.Aether.Physics2D.Settings
Fields
MaxFloat static
float MaxFloat = 3.4028235E+38
Epsilon static
float Epsilon = 1.1920929E-07
EnableDiagnostics static
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.
bool EnableDiagnostics = true
VelocityIterations static
The number of velocity iterations used in the solver.
int VelocityIterations
PositionIterations static
The number of position iterations used in the solver.
int PositionIterations
ContinuousPhysics static
Enable/Disable Continuous Collision Detection (CCD)
bool ContinuousPhysics
UseConvexHullPolygons static
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.
bool UseConvexHullPolygons
TOIVelocityIterations static
The number of velocity iterations in the TOI solver
int TOIVelocityIterations
TOIPositionIterations static
The number of position iterations in the TOI solver
int TOIPositionIterations
MaxSubSteps static
Maximum number of sub-steps per contact in continuous physics simulation.
int MaxSubSteps = 8
AllowSleep static
Enable/Disable sleeping
bool AllowSleep
MaxPolygonVertices static
The maximum number of vertices on a convex polygon.
int MaxPolygonVertices
MaxManifoldPoints static
The maximum number of contact points between two convex shapes. DO NOT CHANGE THIS VALUE!
int MaxManifoldPoints = 2
AABBExtension static
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.
float AABBExtension = 0.1
AABBMultiplier static
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.
float AABBMultiplier = 2
LinearSlop static
A small length used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant.
float LinearSlop = 0.005
AngularSlop static
A small angle used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually insignificant.
float AngularSlop = 0.03490659
PolygonRadius static
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.
float PolygonRadius = 0.01
MaxTOIContacts static
Maximum number of contacts to be handled to solve a TOI impact.
int MaxTOIContacts = 32
VelocityThreshold static
A velocity threshold for elastic collisions. Any collision with a relative linear velocity below this threshold will be treated as inelastic.
float VelocityThreshold = 1
MaxLinearCorrection static
The maximum linear position correction used when solving constraints. This helps to prevent overshoot.
float MaxLinearCorrection = 0.2
MaxAngularCorrection static
The maximum angular position correction used when solving constraints. This helps to prevent overshoot.
float MaxAngularCorrection = 0.13962635
Baumgarte static
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.
float Baumgarte = 0.2
TimeToSleep static
The time that a body must be still before it will go to sleep.
float TimeToSleep = 0.5
LinearSleepTolerance static
A body cannot sleep if its linear velocity is above this tolerance.
float LinearSleepTolerance = 0.01
AngularSleepTolerance static
A body cannot sleep if its angular velocity is above this tolerance.
float AngularSleepTolerance = 0.03490659
MaxTranslation static
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.
float MaxTranslation = 2
MaxTranslationSquared static
float MaxTranslationSquared = 4
MaxRotation static
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.
float MaxRotation = 1.5707964
MaxRotationSquared static
float MaxRotationSquared = 2.4674013
MaxGJKIterations static
Defines the maximum number of iterations made by the GJK algorithm.
int MaxGJKIterations = 20
AutoClearForces static
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.
bool AutoClearForces = true
Methods
MixFriction static
Friction mixing law. Feel free to customize this.
float MixFriction(float friction1, float friction2)
Parameters:
| Name | Type | Description |
|---|---|---|
friction1 |
System.Single |
The friction1. |
friction2 |
System.Single |
The friction2. |
MixRestitution static
Restitution mixing law. Feel free to customize this.
float MixRestitution(float restitution1, float restitution2)
Parameters:
| Name | Type | Description |
|---|---|---|
restitution1 |
System.Single |
The restitution1. |
restitution2 |
System.Single |
The restitution2. |