ドキュメント

Unity Engine

Unity Engine

GetContact(int)

Gets the contact point at the specified index.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public ContactPoint2D GetContact(int index)

Parameters

index

The index of the contact to retrieve.

Returns

Type

Description

ContactPoint2DThe contact at the specified
index
.

Remarks

You can retrieve individual contacts for this collision by
index
. You can use Collision2D.contactCount to determine how many contacts are available.