Search Unity

OverlpSphere returns the same Obect twice

Discussion in 'Scripting' started by Smaples, Apr 26, 2014.

  1. Smaples

    Smaples

    Joined:
    Oct 29, 2013
    Posts:
    12
    Hello,

    I wanna use a Physics.OverlapSphere to get all objects within a specific range of a center object. Everything seems to work fine but sometimes the OverlapSphere returns an object twice within the "return" list. The center object has a capsule collider and the other ojects a box collider attached. I guess it has something todo with the radius and if it hits the front side and the back side of a collider it will return the object twice.

    Can someone help?