Quantcast
Channel: Questions in topic: "follow"
Viewing all articles
Browse latest Browse all 536

Make GUI follow the object

$
0
0
Hi! I am making some kind of colony simulator and I want when you press a human you get a info box. The info box will follow the NPC. But I can not get the box to follow it. And don't redirect me to some WorldToScreenPoint nonsense. It doesn't help me. I can not get it to work in any way even if I simply copy the script line by line. This is what I gave up on. void OnGUI(){ var point = Camera.main.WorldToScreenPoint(transform.position); GUI.Label(new Rect(point.x, Screen.currentResolution.height - point.y - 200, 200, 200), "Blerh"); }

Viewing all articles
Browse latest Browse all 536

Trending Articles



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