Vixen
02b45cc4
csharp
public readonly record struct ContactEvent

Two bodies touched, went on touching, or stopped.

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

Remarks

One event per pair per step, not one per manifold point. A box landing flat on the floor has four contact points and is one thing that happened; the callback that wants all four wants the manifold, and the callback that wants to play a thud wants this.

Which body is first is not stable. Jolt orders a pair by its own internal rules and the order can change between steps as bodies are created and destroyed. Anything that cares which is which must test, not assume.

Fields and properties (6)

  • public ContactPhase Phase

    Which of the three.

  • public BodyHandle First

    One body.

  • public BodyHandle Second

    The other.

  • public Vector3 Position

    A point on the contact manifold, in world space.

  • public Vector3 Normal

    The contact normal, pointing from towards .

  • public float PenetrationDepth

    How far the two overlap along the normal, in metres.

Methods (1)

Used by (4)

  • PhysicsDebugDrawVixen.Physics
  • PhysicsSceneVixen.Physics
  • PhysicsWorldVixen.Physics
  • PhysicsWorldTestsVixen.Physics.Tests