Moving a sprite (coin) from location to score area?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Robster
:warning: Old Version Published before Godot 3 was released.

Hi all,

Funnily enough I’ve been working a lot with sprites as characters, as static entities, etc, but so far haven’t had one move from one point to another.

I want to do the classic "get 1 point, have coin/star float from the place I got point to the score area at top of screen. I’ll be going for a slow beginning movement (ease out) to a fast exit / contact with coin (linear in).

I can’t for the life of me figure it out. Can anyone point me in the right direction so I can have a crack at it?

Any help would be much appreciated.

All the best,

Rob

:bust_in_silhouette: Reply From: Rasmus

You should look into the Tween node.

There are already some answers to your question with examples and all :wink:

Have a look at Reddit - Dive into anything

And of course look up Tween in the Godot docs

Apart from the tween/animation could be better to remove the active coin object and create a coin sprite that moves on the GUI layer from the screen position of the coin to the score.

eons | 2016-11-21 23:06

Fantastic link. It looks pretty powerful, especially the function callbacks etc. Much appreciated.

Robster | 2016-11-22 02:57