I'm struggling with this for some reason.
I have a TweenPosition component on my tutorial pointer arrow, and I'm trying to indicate to my user that they need to drag the one UI element, onto the other.
I've tried using...
pointerTweenPosition
.from = new Vector3
(startElementTransform
.localPosition.x, startElementTransform
.localPosition.y, startElementTransform
.localPosition.z);pointerTweenPosition
.to = new Vector3
(endElementTransform
.localPosition.x, endElementTransform
.localPosition.y, endElementTransform
.localPosition.z);pointerTweenPosition.PlayForward();
and
pointerTweenPosition
.from = UICamera
.currentCamera.ScreenToWorldPoint(new Vector3
(startElementTransform
.localPosition.x, startElementTransform
.localPosition.y, startElementTransform
.localPosition.z));pointerTweenPosition
.to = UICamera
.currentCamera.ScreenToWorldPoint(new Vector3
(endElementTransform
.localPosition.x, endElementTransform
.localPosition.y, endElementTransform
.localPosition.z));pointerTweenPosition.PlayForward();
But neither work properly. The pointer never appears in the right place.
Whats the easiest way to get this working properly?
Thanks