I used to play this game on Kongregate called Death vs Monstars.
A tl;dp (too long; didn't play) explanation of the mechanics is that the character you control follows your mouse cursor. Your charcter fires projectiles endlessly in the direction opposite of that in which you just moved (basically out of your back). This game offers a fairly smooth experience in that you can be fairly sure that the projectiles will fire in the opposite direction that you move your mouse in.
I recently tried to recreate this idea in Godot 3.0.6 Mono. It's not the same game, but the idea is that the character controlled by your mouse has an object that is always pointing in the opposite direction of the character. The problem I faced is that the capturing the direction in which the player moves every frame is limited to the very discrete grid of pixels which Godot (and presumably most other engines) uses to interpret the cursor position. Essentially I just get the angle of rotation from the old position vector to the new position vector, and rotate the character accordingly before updating the position. The result is that the direction in which the character is facing, and thus the object behind it, is very unpredictable. For example, you may move your mouse at a 60 degree angle, but the character ends up pointing in a 45 degree angle depending on what pixel your cursor ends up in.
Is there a less discrete way to approach this problem? Instead of reading the integer-vector position of the mouse cursor, could one somehow get the velocity of the mouse movement?
Any other methods of doing this are also appreciated. I am not asking this question for Godot specifically, but generally, in case there is a common "right" way to do this.