|
Hi! Is there any way to draw a particle effect, using e.g. ParticleSystem, to draw it over text drawn using either GUIText or GUI.Label? I need to move a particle effect over a text the user selects, and need to draw it over the text as it looks kind of strange being drawn behind the text... Or perhaps someway of turning text into a texture, and drawing it as a normal gameobject behind the particles or something? Thanks! :)
(comments are locked)
|
|
You have to use more than one camera: put the particle system on a layer of its own, which is drawn by a camera that only shows that layer, and has clear flags set to depth only. This camera should have a higher depth so it draws on top of the camera that has the GUIText, and the particle system camera shouldn't have a GUILayer component. This will only work with GUIText/GUITexture and not OnGUI functions, which seem to be drawn on top of everything regardless. There's an answer around somewhere which explains the camera setup in more detail if you need that. Ahh, that works nicely, thanks! :)
Jun 07 '10 at 11:50 PM
TMK
there's some step by step tutorial for that? I have the same problem!
Jan 05 '12 at 07:28 PM
DarkSlash
(comments are locked)
|
|
Instead of GUIText or GUI.Label, use the TextMesh component (GameObject->Create->3d Text). That gives you a text mesh, which you can freely place in your 3d world.
(comments are locked)
|
|
I don't think there is a way to do specifically what you ask for (although I haven't tried the render to texture approach personally), but you could do it by making your text out of a text mesh. You'll have to use a different shader for your text mesh material so it gets sorted properly instead of drawn on top of everything always. There's an example of one here. Cool, that works, thanks! The 3D text was more blurry than a regular GUIText though, so I might go for the multiple-camera answer instead if I'm not able to fix the more blurry text.
Jun 07 '10 at 11:52 PM
TMK
Another solution would be to import a higher-res font (in the import settings change the font size) if that's what's causing your blurryness. Also please be sure to mark the question as "answered".
Jun 07 '10 at 11:58 PM
Tetrad
Thanks, I tried that, but it still wasn't as clear as 100% GUIText or GUI.Label... :(
Jun 08 '10 at 02:17 PM
TMK
(comments are locked)
|
