Is there a way to visibly see how large an overlap sphere is? As far as I can tell it given no indication of units for the radius given and since its an invisible physics object I can’t really see how large it actually is. It keeps being to large and I can’t tell how big it really is.
You can use the Gizmo DrawSphere to see the sphere in the Scene:
http://unity3d.com/support/documentation/ScriptReference/Gizmos.DrawSphere.html
That needs to go in the OnDrawGizmos or OnDrawGizmosSelected methods.
private void OnDrawGizmosSelected() {
Gizmos.color = Color.red
//Use the same vars you use to draw your Overlap SPhere to draw your Wire Sphere.
Gizmos.DrawWireSphere (transform.position + m_Position, m_Radius);
}
If you want to see it in the Player, the easiest way would probably be to Instantiate a Sphere prefab at the exact same dimensions of your OverlapSphere. I do not think OverlapSphere has any kind of built in way of doing this.
For some reasons, I couldn’t get OnDrawGizmosSelected()
to work. But OnDrawGizmos()
did the trick just fine !