- Home /
Objective indicator for objects hidden behind other objects.
Hi,
I have complex mazes in my game and I want to guide player which direction to look, like in FPS games that you know that you have to go like North East because of an indicator like a rectangle or triangle that is on the screen. Please note the following picture and the several "targat"'s on it. All of them are behind other objects but we can see where they are in screen space:
So basically I have to do something like translating world to camera coordination, then put my indicator on that place but since I think it's more complicated than that, I thought to ask you guys.
Thanks.
@test84 how did it go? Please maintain feedback with us and keep us updated on your problem.
Answer by robertbu · Oct 25, 2013 at 06:48 AM
Not sure about the maze since your directions will depend on a pathway, but if you have a world position for the target, then you can do a Camera.WorldToScreenPoint() then convert the screen point to a GUI point to place a GUI.DrawTexture. Or you can do a Camera.WorldToViewportPoint() to place a GUITexture. Or you could combine one of the above with a Raycast from to the target and place the target graphic in world space in front of the first object the cast hits.
Answer by fafase · Oct 25, 2013 at 06:58 AM
Simply use 3DText object placed above the other players.
Usually the problem with 3DText is taht they show all the way, now that is what you want so all good.
The reason is the sahder they use, GUI shader that draws on top of everything.
Your answer
Follow this Question
Related Questions
how to rotate GUI Textures 5 Answers
Make my HUD full screen 2 Answers
rotate only a layer(HUD) when rotation occurs. 0 Answers
Need help with HUD 1 Answer
hud targetmark behind the screen 1 Answer