1. Hi, how to do RayCastAll to four directions in 1 time?

    I need to check all directions unless UP and DOWN.
    2016-03-04 00-44-54 Скриншот экрана.png
     
  2. Would a sphere work? Centered on the box?
     
  3. Sphere includes also under and upper colliders :(
     
  4. Just do four Raycasts in the different directions.
     
  5. I was looking for a optimized way. Maybe need make a sphere cast then check hit positions on UP and DOWN from start position.
     
  6. If do four raycasts, you should be able to do that with maybe maximal 10 more lines than when having this in one function.
    Why waste time searching for a "optimized way" when you could have simply done the normal way by now?

    You could try a BoxCast or OverlapBox.
    Though that would be like this:
    2016-03-04 00-44-54 Скриншот экрана2.png
     
    Last edited by a moderator: Mar 4, 2016