Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ContactPairHeader

A header struct which contains colliding bodies.
Read time 1 minuteLast updated 3 days ago

Definition

  • Type: Struct
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public readonly struct ContactPairHeader

Remarks

This struct contains an array of ContactPairs that can be retrieved with the ContactPairHeader.GetContactPair method.

Properties

Property

Description

bodyThe first Rigidbody or ArticulationBody in the pair.
bodyAngularVelocityAngular velocity of the first Rigidbody or the ArticulationBody in the pair at the moment of collision.
bodyEntityIdEntityId of the first Rigidbody or the ArticulationBody in the pair.
bodyLinearVelocityLinear velocity of the first Rigidbody or the ArticulationBody in the pair at the moment of collision.
otherBodyThe second Rigidbody or ArticulationBody in the pair.
otherBodyAngularVelocityAngular velocity of the second Rigidbody or the ArticulationBody in the pair at the moment of collision.
otherBodyEntityIdEntityId of the second Rigidbody or the ArticulationBody in the pair.
otherBodyLinearVelocityLinear velocity of the second Rigidbody or the ArticulationBody in the pair at the moment of collision.
pairCountNumber of ContactPairs that this header contains.

Methods

Method

Description

GetContactPairGets the ContactPair at
index
of this pair header.