Drawing Colliders

How can I draw a circle that exactaly matches my sphere colliders position?

Could you rephrase the question? I do not understand what you mean. You want to draw a circle (with your mouse?) in 3d along the surface of a sphere collider?

My camera is fixed as it was a 2d game. I want to draw a circle in the exact position of my object´s sphere colliders so I can debug some strange collisions that are occuring... Is this better now?

1 Answer

1

You will want to use Handles.DrawWireDisc

Handles.DrawWireDisc( object.transform.position, camera.transform.forward, object.collider.radius )

If the object is parented to other objects you’ll have to take the scaling into account for the collider’s radius.

Another point half related to this question: if I use a GUITexture, it´s transform position is related to it´s center or to the texture upper left corner?

bottom left.