Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to make an ui to follow gameobject

public Transform target;
 
void Update ()
{
     Vector3 wantedPos = Camera.main.WorldToScreenPoint(target.position);
     transform.position = wantedPos;
}
 
PREVIOUS NEXT
Tagged: #ui #follow #gameobject
ADD COMMENT
Topic
Name
2+6 =