- Home /
How to draw outlines around objects
The easiest example I can think of is Blender. When you select an object in Object mode, it draws an orange outline around it.
This effect seems like it would be useful for selecting an object.
How would I do or emulate that effect in Unity?
Never done it, but I would imagine rendering the objebt slightly scaled and with an unlit orange flat shader and then rendering the normal object again over it would do the trick. But not a perfect solution :/
Blender is open source. You could look at their source and adapt it to Unity Gizmos. Just a thought.
There is this shader : http://wiki.unity3d.com/index.php/Silhouette-Outlined_Diffuse
Awesome. That script looks like it does exactly what I'm looking for. I wish this was an answer so I could mark this question as answered.
However, now I have one issue that I haven't been able to find the solution to - how do I use these scripts?
They're not scripts, they're shaders. See the Unity docs about using shaders.
Answer by Cinematronic · Jan 24, 2013 at 10:08 PM
Make a second model a little bit bigger and set it as a child of the original. Change the material of it and add color. Set collider off. Use a script to make it appear and disappear on mouse over or use triggers or whatever.
Your answer
Follow this Question
Related Questions
How Do I Make The "Solar Outline" Effect? 0 Answers
Graphics.DrawMesh not working 2 Answers
How can I draw an array of data (640x480) very fast ? 5 Answers
Drawing bullets using GUITextures 1 Answer
Invert background in shadergraph 0 Answers