What is the best way to show (Instantiate) a GUIText at the position of a GameObject?

I am building a score effect that Instantiates a GUIText at the position where the points where collected. The problem is that I dont know how to convert the GameObjects position (3d) to the GUIText position (2d). Any suggestions?

Also, is GUIText the best approach here?

GUIText uses ViewPort coords, meaning (0.5, 0.5) is the middle of the screen, so use `Camera.main.WorldToViewportPoint(transform.position)` to get the correct coords.

WorldToScreen is correct if you write code for a `GUI.Box`, etc.. which use ScreenCoords (pixels.)

Also, probably don't child to anything, since it will recompute your position next frame using (wrong) worldView numbers.

I prefer using GUIText, since you can add a "live for 4 secs" script, make a prefab and spawn them as needed. Using the in-code GUI.Label version requires you to build and maintain your own List-like data structure.

check out the tutorials Burg Zerg Arcade, he teaches how to create a complete RPG and I think this feature is also scoring

Link: http://www.burgzergarcade.com/hack-slash-rpg-unity3d-game-engine-tutorial

You could use the function Camera.WorldToScreenPoint to get the position of an object in pixel coordinates (screen coordinates) and then use this values to draw your GUI.