Changing mouse position

im making a 2d shooter, but i want the mouse, where the bullets will fly, to move with the player so that the crosshair will not stay focused on one position. Any Ideas on ho to do it?

Easy, just make a courser (sprite2d) that is moved by the mouse. When click to Fire, get the global position of the courser and find the difference from the player. Use that vector to aim the bullet.

If you want to move the player’s real cursor (the one provided by the OS) you could use Input.warp_mouse(Vector2(x,y)). Otherwise just use Input.mouse_mode = Input.MOUSE_MODE_CONFINED_HIDDEN to hide the cursor then just move a fake mouse (a node with a mouse texture) by getting mouse movement from InputEventMouseMotion.velocity .