making objects visible through other objects

Hi Community,

Im new to Unity, so this might be a question already asked:

Im trying to create “Transform handles” like those in Maya or blender for translation, rotation and scaling. It already works so far, only one problem remains:

The handles are not visible through other objects, wich means if an object is scaled up very much the handles are not visible at all. Is there a method that i can make those handles visible through all other objects? (without making the objects transparen)

this image shows the problem:

In this case, the handle for the x-axis isnt visible anymore (i could click through the object and scale it anyway, but its not a “nice” solution)

thanks in advance


If this is an Editor script, see Gizmos and Handles in the Script Reference. If this is done at run time, you could have a second camera, different layer, and set these handles in that layer. Then set the camera’s ‘depth’ so that it draws last. Thus you would have the main 3d scene drawn first and the UI handles drawn on top of it. Beyond that you get into using GL calls.