Search Unity

Checking a position for a collision

Discussion in 'Scripting' started by Inventivum_Games, Dec 26, 2016.

  1. Inventivum_Games

    Inventivum_Games

    Joined:
    Dec 15, 2016
    Posts:
    1
    I've been making a script that places road tiles but they keep overlapping i was wondering if there was a way to check the next location to see if there is something there and if there is i would like it stop but i cant seem to find anything, is there a function like "CollisionPoint" or something where i can just pass in a vector3 position for it to check, any help would be appreciated. Thanks
     
  2. gorbit99

    gorbit99

    Joined:
    Jul 14, 2015
    Posts:
    1,175
    Physics.CheckSphere/Cube, that's probably the closest you can get
     
unityunity