Search Unity

Checking for a collider?

Discussion in 'Physics' started by MerijnZ1, Apr 26, 2017.

  1. MerijnZ1

    MerijnZ1

    Joined:
    May 29, 2016
    Posts:
    1
    So let's say I want to have a boolean in my code called "hasColliderAtSetPos" how do I make that true if there is a collider at the given position? Is there a "CheckForColl(vector3 pos)" function? This would come in really handy. Thanks in advance!
     
  2. hoesterey

    hoesterey

    Joined:
    Mar 19, 2010
    Posts:
    659
    You could do a SphereCast at given position.