기술 자료

Unity Engine

Unity Engine

CanContact(Collider2D)

This method determines if both Colliders can ever come into contact.
읽는 시간 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: