I’m learning to program and I made a runner from the tutorial.
How to make a coin fly to the corner of the screen when picking it up?
Thanks
I’m learning to program and I made a runner from the tutorial.
How to make a coin fly to the corner of the screen when picking it up?
Thanks
Hello!
This example might help you:
If you are going for the effect of animating the node from world space (where coins are game objects) to screen space (gui), you might meet to transform the coordinates, but for Runner, the coins are going simply from a pickup position always to one place in the space, so I hope the example covers your use case If not, let us know!
I tried to implement from this example for a long time, but I didn’t succeed and I decided to write here to find out if there is another way to do this
It looks to me you’d like to:
The tricky part is to convert the world position of the coin to a GUI (screen) position. If you use the Defold Orthographic extension camera, you can do it with:
I’m not sure if there is an example of this knocking about somewhere.
The animation done in this example looks a bit like the sketch you made:
Perhaps this is helpful to you?