Hi guys!
I'm developing a platform game where collectible coins automatically go to the HUD in the top left of the screen when the character collects them in the stages, as in the image below:
Since I couldn't do it using the bullet and Line of Sight behavior (!!!), I resorted to Lerp and/or Position to do it successfully.
However, since the game's coins and the HUD are on different layers, the last coins collected are always shifted several pixels forward when they are collected, causing a strange effect.
I tried to solve it using Viewport expressions and creating two variables (TargetX and TargetY), but I was unsuccessful (see image below).
Does anyone have any suggestions on how to solve this in C2?
Thank you in advance!