Hi,
I have set up a camera to orbit around an object and I want to display a UI image near a particular part of the object which rotates while the camera orbits.
How might I go about this using the new Unity 5 UI.
Can someone please guide me.
Thanks,
Red.
I advise you to use the following function to get the position of your label from a 3D point :
public Vector3 WorldToViewportPoint(Vector3 position);
Doc : Unity - Scripting API: Camera.WorldToViewportPoint
Finally, you set the anchor position of your label with RectTransform :
RectTransforms are used to store and
manipulate the position, size, and
anchoring of a rectangle and supports
various forms of scaling based on a
parent RectTransform.
See Unity - Scripting API: RectTransform
labelPosition = Camera.main.WorldToViewportPoint( position ) ;
rectTransform.anchorMin = labelPosition ;
rectTransform.anchorMax = labelPosition ;
I made a similar feature, see this question :