Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsShape.ContactManifold

A contact manifold describes the contact points between colliding shapes. Speculative collision is used so some contact points may be separated, a property available per-contact.
Read time 1 minuteLast updated 13 days ago

Definition

public struct PhysicsShape.ContactManifold : IEnumerable<PhysicsShape.ContactManifold.ManifoldPoint>, IEnumerable, IEquatable<PhysicsShape.ContactManifold>

Properties

Property

Description

this[]Indexer to access the manifold points.
normalThe unit normal vector in world space, pointing from shape A to shape B. During a pre-contact callback this may be modified, and the solver uses the new value this step. It must stay unit length. If the callback leaves the manifold invalid, whether a non-unit normal, a non-finite value, or a point count outside [0, 2], the whole edit is discarded and the manifold is restored for that step.
pointCountThe number of manifold points available, in the range [0, 2]. During a pre-contact callback this may be lowered, and setting it to zero cancels the contact so it is not solved this step.
pointsThe manifold points, up to two are possible. This is a read-only view of the points, so use the indexer on the manifold to change one during a pre-contact callback.
rollingImpulseAngular impulse applied for rolling resistance (N " m " s = kg * m^2 / s).
speculativePointCountThe number of manifold points available that are speculative, in the range [0, 2].

Structs

Struct

Description

PhysicsShape.ContactManifold.ManifoldPointContains 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.
PhysicsShape.ContactManifold.ManifoldPointArrayFixed-sized manifold point array.