- Home /
Transparent object appear on top of all others
I've searched around a little, and im wndering if there is a shader/button that will allow me to have a object alays appear on top of other objects, similar to the 3D Text(without the 3D Text shader)?
This if for a targeting reticule. I thoug it would be easier to have a always-on-top texture lock to the target, instead of gui. Thanks for any help!
[EDIT] This is for a missle lock on, so it will track to the target, and can easily be animated
I'm not looking for a crosshair, i meant a missle lock on, that tracked to the target(im my case a car) and could be animated.
Answer by Chris D · Jul 12, 2011 at 10:09 PM
I think I'm missing something...
>>I want to have a plane parented to the target that alyways looks at the camera, that can move around with the target, and be animated.
Why not do exactly that? Check out the lookAt functions.
Edit
is this the kind of thing you're after?
http://answers.unity3d.com/questions/17841/always-render-a-object-on-top-of-another.html
also: http://answers.unity3d.com/questions/11594/how-do-i-specify-the-render-order-of-gameobjects.html
Perfect! I already had the lookAt stuff figured out, just had to get it on top, thanks!
Answer by Eric5h5 · Jul 12, 2011 at 09:59 PM
Use a GUITexture.
GUI texture would be more diffifult than what i want. I want to have a plane parented to the target that alyways looks at the camera, that can move around with the target, and be animated.
GUITexture wouldn't be more difficult, it would be easier. To have the GUITexture move around with the target, use WorldToViewportPoint.
GUITexture has the disadvantage of not working nicely with Stereoscopics (3D glasses), but otherwise it's definitely the easier approach.
Your answer
Follow this Question
Related Questions
How to call OnGUI() on class object 1 Answer
Need Help > Why my 3D modelling became transparent 1 Answer
Rendering order of objects in different depths not correct. 1 Answer
How to make object turn transparent then solid again through a time duration? 1 Answer
Transparency shader that also writes to Camera Depth Texture 0 Answers