Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsShape.ContactManifold.ManifoldPoint

Contains all the detail related to the geometry and dynamics of the contact. You may use the _totalNormalImpulse to determine if there was an interaction during the time step.
Read time 1 minuteLast updated 13 days ago

Definition

  • Type: Struct
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public readonly struct PhysicsShape.ContactManifold.ManifoldPoint

Properties

Property

Description

anchorALocation of the contact point relative to shapeA's origin in world space.
anchorBLocation of the contact point relative to shapeB's origin in world space.
idUniquely identifies a contact point between two shapes. This should not be confused with PhysicsShape.ContactId.
normalImpulseThe impulse along the manifold normal vector.
normalVelocityRelative normal velocity pre-solve. Used for hit events. If the normal impulse is zero then there was no hit. Negative means shapes are approaching.
persistedDid this contact point exist the previous step?
pointLocation of the contact point in world space. Subject to precision loss at large coordinates. This point lags behind when contact recycling is used. Preference should be to use anchorA and/or anchorB for game logic. This is also known as the "clip" point.
separationThe separation of the contact point, negative if penetrating.
speculativeIs the contact point speculative i.e. not currently interacting?
tangentImpulseThe friction impulse.
totalNormalImpulseThe total normal impulse applied across sub-stepping and restitution. This includes the warm starting impulse, the sub-step delta impulse, and the restitution impulse. This can be used to identify speculative contact points that had an interaction during the simulation step.