- Home /
Objective Pointer
Hey guys,
I want to make a sort of arrow at the top of my screen, which points in the directions of the objective object.
So far, I have this script. It just rotates the object to look at the objective:
var target : Transform;
function Update() {
transform.LookAt(target);
}
But i can't seem to rotate a gui object, (which is a bit stupid, because i take it that gui can't be rotated, but i don't know how to get a sort of arrow game object up the top, in which can rotate to face the objective....
All answers are greatly appreciated!
-Grady
try looking at functions like Camera.main.WorldToScreenPoint(target.position);
and other similar functions and feed back the data into your GUI object.
http://unity3d.com/support/documentation/ScriptReference/Camera.WorldToScreenPoint.html
Your answer
Follow this Question
Related Questions
How to make a game objective pointer? 1 Answer
How do I do left to right movement with ONLY the WASD keys? 1 Answer
Clearing a GUI and Pausing a Game 1 Answer
gui Walkie talkie 1 Answer
Cube Counter 1 Answer