How to visually debug Physics.OverlapSphere?

the only thing that came to my mind is to create a sphere object and give it same size and location of Physics.OverlapSphere the problem is unity sphere is getting a vector3 as size and not a radius so I cant get to to be on same size;

The scale will be Radius * 2.

1 Like

this free asset has a lot of extra debug.draw methods, such as one that can draw spheres.

1 Like

thanks I think that’s it working great :slight_smile:

why unity dont provide built in function for that otherwise when I use Physics.OverlapSphere with some radius it’s just guessing

3 Likes
private void OnDrawGizmos()
        {
            Gizmos.DrawWireSphere(position, radius);
        }
6 Likes