Showing information of incoming gameobject

Hi guys,

I’m new to Unity, now Im plan to build a space game where my spaceship will always driving forward and shooting incoming asteroids.

example game: http://www.matteley.co.uk/labs/unity3d-spacerunner/

The problem now is I need to display GUIText AND crosshair on infront of incoming asteroids that will move along (x,y,NOT Z) with them? I know that this can be done by using WorldToViewportPoint.

Should I separate the labels from asteroid gameobjects or combine both of them? How can it be done?

thanks.

you have to seperate it, because if it is a child of some object, the transform.position of parent would also be added to the gui.text’s transform.position and would give a unexpected output(depending upon parent’s position),

but the best way would be drawing it using GUI.Label function!! with WorldToScreenPoint function…this would make it organized