Version: 2021.2

ModifiableContactPair

struct in UnityEngine

切换到手册

描述

A light-weight proxy that allows to access the contact buffers directly.

变量

bodyInstanceIDInstance ID of the first body in this contact pair.
colliderInstanceIDInstance ID of the first Collider in this contact pair.
contactCountThe amount of the contact points generated for this contact pair.
massPropertiesMass-related properties of this contact pair, such as the mass ratio.
otherBodyInstanceIDInstance ID of the second body in this contact pair.
otherColliderInstanceIDInstance ID of the second collider in this contact pair.
otherPositionWorld-space position of the second collider in this contact pair as seen by the solver.
otherRotationWorld-space rotation of the second collider in this contact pair as seen by the solver.
positionWorld-space position of the first collider in this contact pair as seen by the solver.
rotationWorld-space rotation of the first collider in this contact pair as seen by the solver.

公共函数

GetBouncinessGet the restitution value for the specified contact point in this contact pair.
GetDynamicFrictionGet the value of the dynamic friction for a specified contact point in this contact pair.
GetFaceIndexGet the index of a face a particular contact point belongs to in this contact pair. Use this with Mesh.triangles.
GetMaxImpulseGet the maximum impulse that the solver can apply at a particular contact point in this contact pair.
GetNormalGet the normal at a particular contact point in this contact pair.
GetPointGet the location of a particular contact point in this contact pair.
GetSeparationGet the separation value at a particular contact point in this contact pair.
GetStaticFrictionGet the static friction coefficient at a particular point of the contact pair.
GetTargetVelocityGet the target velocity the solver should aim reaching at a particular contact point in this contact pair.
IgnoreContactIgnore the specified contact point in this contact pair.
SetBouncinessSet the restitution value for the specified contact point in this contact pair.
SetDynamicFrictionSet the value of the dynamic friction for a specified contact point in this contact pair.
SetMaxImpulseSet the maximum impulse that the solver can apply at a particular contact point in this contact pair.
SetNormalSet the normal at a particular contact point in this contact pair.
SetPointSet the location of a particular contact point in this contact pair.
SetSeparationSet the separation value at a particular contact point in this contact pair.
SetStaticFrictionSet the static friction coefficient at a particular point of the contact pair.
SetTargetVelocitySet the target velocity the solver should aim reaching at a particular contact point in this contact pair.