ドキュメント

Unity Engine

Unity Engine

CanContact(Collider2D)

This method determines if both Colliders can ever come into contact.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.Physics2DModule
public bool CanContact(Collider2D collider)

Parameters

collider

The other Collider that is to be checked to see if it can contact the current Collider.

Returns

Type

Description

boolReturns
true
if both Colliders can contact each other otherwise
false
indicating that they cannot contact each other.

Remarks

Determining if Colliders can come into contact involves multiple checks including: