Line Compass Mask?

Okay, so I’m looking at adding a line compass (GUITexture) to my game, similar to the one in Halo: Reach.

Like so: —|— NW —|-------|— N —|-------|— NE —|—

I can get it to work (using forum code for now) but I’m looking at applying some sort of alpha mask to it so that it fades out leaving only the relevant directions (that the player is facing) visible. Heck I’ll attach a picture, it’s kind of hard to explain in words.

The top one in the image explains what the compass looks like now and the bottom one is what I’d like it to look like. So, what’s the best bet?

Aye, I would use a 3d tube (cylinder) and apply an alpha texture so it only shows what you want then use this thread to make the mask

http://forum.unity3d.com/threads/11689-Mask-and-GUI-s-is-it-possible

With the cylinder you can easily rig it up like the compass in that example and still apply the masks - just use a render texture on your HUD to make it appear the way you want.

Thats what I did with one of my games, worked just fine :stuck_out_tongue:

I’ve been trying to do it using render texture, but all I’m getting is a whole lot of incomprehensible pixel mess. This could however be due to the fact that I load the character and GUI before I load the level itself, I’m not entirely sure though, It doesn’t make a whole lot of sense. I can place the render texture in the next (loaded) level and it works fine, it even works between scenes… I’m sure I’ll work it out eventually, thanks for your helpful pointers.

I’ll share the result here when I’m done for the future reference of others, I imagine this sort of thing could prove invaluable to other developers.

Hi, I’m trying to make the same thing. How did you solve it?