What I’m trying:
I placed the coin on a CanvasLayer and I’m doing a tween to send it to the corner. The problem is I need to get where the chest is located and then translate that to the CanvasLayer’s components to then tween to the corner.
The sprite position that I’m passing into coin to start the tween is I think the global_position to the entire game. Not sure how to translate between the two.
After the signal fires, I delete the in-game coin that triggered the collision.
When the signal is received (in my case by the CanvasLayer-based HUD scene) I instance a new coin at the (converted) position passed in the signal. From there, the new coin’s start and end position are both in canvas coordinates, which is easy to handle via a simple Tween.
I’m not sure if there’s a better way, but the above worked for me.
I couldn’t find a better way, or any way for that matter. The trick was to use the get_global_transform_with_canvas origin. I didn’t know this exsisted and still don’t know what the difference is between the different positions but this definitely worked. Thanks! I had actually given up on making “collections” in my game this way so glad I could add it back in