public readonly record struct ContactEventTwo 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 PhaseWhich of the three.
public BodyHandle FirstOne body.
public BodyHandle SecondThe other.
public Vector3 PositionA point on the contact manifold, in world space.
public Vector3 NormalThe contact normal, pointing from towards .
public float PenetrationDepthHow far the two overlap along the normal, in metres.
Methods (1)
public ContactEvent(ContactPhase Phase, BodyHandle First, BodyHandle Second, Vector3 Position, Vector3 Normal, float PenetrationDepth)Two bodies touched, went on touching, or stopped.
Used by (4)
- PhysicsDebugDrawVixen.Physics
- PhysicsSceneVixen.Physics
- PhysicsWorldVixen.Physics
- PhysicsWorldTestsVixen.Physics.Tests