Vixen
02b45cc4
csharp
public record class PhysicsWorldSettings

How a PhysicsWorld is built and how hard it works.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The capacities are hard ceilings, not hints: Jolt allocates its body array, its body-pair cache and its contact-constraint buffer once at construction and never grows them, which is what lets a step allocate nothing at all. Running out is reported through PhysicsStepResult rather than by growing.

The defaults suit a level of a few thousand bodies. A stress test that wants a hundred thousand says so here, at the cost of the memory to hold them.

Fields and properties (12)

  • public PhysicsLayers Layers

    The layer table. What collides with what.

  • public Vector3 Gravity

    Gravity, in metres a second squared. Earth by default.

  • public int MaxBodies

    The most bodies that can exist at once.

  • public int MaxBodyPairs

    The most overlapping pairs the broad phase may report in one step.

  • public int MaxContactConstraints

    The most contact constraints the solver may hold in one step.

  • public int BodyMutexCount

    How many mutexes guard the body array, or zero for Jolt's default.

  • public int ThreadCount

    How many worker threads Jolt may use, or zero for one per hardware thread bar one.

  • public int CollisionStepsPerUpdate

    How many collision sub-steps each call to Step runs.

  • public int VelocityIterations

    How many velocity iterations the solver runs.

  • public int PositionIterations

    How many position iterations the solver runs.

  • public bool Deterministic

    Whether to hold Jolt to bit-identical results for identical input.

  • public bool AllowSleeping

    Whether bodies may fall asleep at all. Per-body sleeping is on top of this.

Used by (8)

  • PhysicsConstraintTestsVixen.Physics.Tests
  • PhysicsDeterminismTestsVixen.Physics.Tests
  • PhysicsLayerTestsVixen.Physics.Tests
  • PhysicsQueryTestsVixen.Physics.Tests
  • PhysicsSceneVixen.Physics
  • PhysicsSceneTestsVixen.Physics.Tests
  • PhysicsWorldVixen.Physics
  • PhysicsWorldTestsVixen.Physics.Tests