I’m attempting to move a coin from where it is, to a ui text element showing the score. The problem is that the it does not move to where the UI is shown ingame (top left corner of the screen). It instead moves towards its location on the giant canvas in the scene view (ingame moving way up off-screen).
transform.position = Vector2.SmoothDamp(transform.position, RectTransformUtility.WorldToScreenPoint(Camera.main, uiTarget.position), ref velocity, smoothTime);
I’ve tried a bunch of utilities, all to no avail, the above being my latest attempt.
Any wisdom is much appreciated.