Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Racing AI Revisited: Box Collider Trigger vs Raycast vs ??? - Performance

Discussion in 'Scripting' started by xlr8, Jan 6, 2014.

  1. xlr8

    xlr8

    Joined:
    Jun 10, 2013
    Posts:
    22
    I've so far managed to improve the (now defunct) Gotow Car tutorial to use adjustable waypoints that can slide along the track width. The next step is to add collision avoidance for vehicles.

    In terms of performance, which is a better approach - two box-colliders surrounding each vehicle along perpendicular axes, or a series of raycasts that extend along different angles from the front of the vehicle?
     
  2. mkthGames

    mkthGames

    Joined:
    Aug 2, 2013
    Posts:
    4
    Box colliders are better in terms of performance. Keep in mind that Mesh colliders are not that good as box colliders.