|
Hey everyone, I was wondering if anyone knew how to make a game objective pointer, so like a GUI arrow at the top of the screen that points in the direction that the player would have to go to reach an objective..... Any answers are appreciated!!!!!! -Grady
(comments are locked)
|
|
First, get the position of wherever the objective is. Then, subtract the position of your character from that position to get the direction vector. Then, depending on the direction vector, switch the texture being displayed (if you have multiple images representing different directions) or rotate the texture using GUIUtility.RotateAroundPivot (if you just have one texture for the arrow and are displaying it using OnGUI). i'm not that good with scripting..... is there a tutorial or example anywhere??? -Thanks
Jun 28 '11 at 11:49 PM
Grady
a tutorial for that specific thing you want to do? not likely. There are plenty of tutorials that will teach you the basics, which is all you need for something like this. So that would be what I recommend.
Jun 28 '11 at 11:57 PM
testure
(comments are locked)
|
