Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Splankton on December 07, 2018, 03:44:14 PM
-
Hi, I have a gameobject at a vector 2 position, and a sprite in the UI.
How can I move the UI sprite to the vector 2 position, from the UI space?
-
Hi,
There is an action called Ugui UI To World Point
It needs a vector 3 tho but you can convert the Vector 2 and to a vector 3 and set z to 0
-
Hi,
Thanks I can't find that action. Is it the same as Rect Transform World To Screen Point ?
-
Hi.
Maybe it is in the ugui proxy full package :)
-
Ok I have it, thanks. I just cant get it working. It always give me the wrong positions. I'd like to move the UI sprite over time, to the vector2 position.
The best I got was using the MoveTo action to the destination position, but it moved to the bottom left of the UI rect.
Any ideas where I'm going wrong?
-
Hi,
the UI rect is depending on the layout rules you have applied, so make sure you have centered your Rect and set the pivot to be centered as well, else you might want to make an invisible rect of a 1px size, that is laid out to be centered where you want.
Bye,
Jean
-
thanks Jean, thats has sorted it.