Quantcast
Channel: Answers by "Dreamblur"
Viewing all articles
Browse latest Browse all 56

Answer by Dreamblur

$
0
0
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).

Viewing all articles
Browse latest Browse all 56

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>