Vixen
02b45cc4
csharp
public sealed class PhysicsLayers

The layer table: what each layer is called, whether it moves, and which layers it collides with.

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

Remarks

Built once and handed to a PhysicsWorld, which turns it into the three filter objects Jolt actually wants — an object-layer pair table, a broad-phase layer table, and the mapping between them. Those are native objects with a lifetime tied to the physics system, which is why this type is a description and not the filters themselves: the same table can configure any number of worlds.

The matrix is symmetric and kept that way. Jolt asks "may layer A collide with layer B" in whichever order the broad phase produced the pair, so a matrix that said yes one way and no the other would give a collision that depends on body creation order. Every mutator writes both halves.

Fields and properties (3)

  • public const int MaxLayers

    The most layers there can be, fixed by PhysicsLayerMask being one word.

  • public int Count

    How many layers the table declares.

  • public static PhysicsLayers Default

    The table a world gets when it is not given one: layer 0 Static, layer 1 Moving, and everything collides with everything.

Methods (6)

Used by (6)

  • BuilderVixen.Physics
  • PhysicsLayerTestsVixen.Physics.Tests
  • PhysicsQueryTestsVixen.Physics.Tests
  • PhysicsWorldVixen.Physics
  • PhysicsWorldSettingsVixen.Physics
  • PhysicsWorldTestsVixen.Physics.Tests