Search Unity

whats faster a raycast, or a collision test

Discussion in 'Editor & General Support' started by spiralgear, Mar 1, 2008.

  1. spiralgear

    spiralgear

    Joined:
    Dec 13, 2007
    Posts:
    528
    ive heard that excessive raycasting will take a chunk out of performance, i need 30 things in my scene to be raycasting every frame, but i also thought of a way of doing it using an empty GO with a box collider


    which is faster?
     
  2. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    Probably the box collider. What else is in your scene?
     
  3. spiralgear

    spiralgear

    Joined:
    Dec 13, 2007
    Posts:
    528
    its a generic shooter, the 30 objects are little bombs on a flocking script im working on that track the walls and ground and move towards a target being selected by the player