Z
Z
Zefirot2021-07-26 10:59:48
Unity
Zefirot, 2021-07-26 10:59:48

How to create a visual movement of a sprite in the UI?

There is a field on which objects (sprites) move, here one sprite reaches another and you need to add it to the "counter" on the UI panel, I understand that they seem to be in different planes, but somehow they do it, that's the question of how ?
That is, at the bottom there is a UI panel with text and you need the sprite to move there....

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tosha43, 2021-07-26
@Tosha43

You take the position of the UI element, put it into the Camera.main.ScreenToWorldPoint() method and send the desired sprite to the resulting vector

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question