Answers for "unity check if colliders are touching"

C#
0

unity check if colliders are touching

public Collider2D objectCollider;
 public Collider2D anotherCollider;
 
 private void SomeMethod()
 {
     if (objectCollider.IsTouching(anotherCollider))
     {
         // Do something;
     }
 }
Posted by: Guest on July-07-2020

Code answers related to "unity check if colliders are touching"

C# Answers by Framework

Browse Popular Code Answers by Language