So my character is controlled by mouse movement, and I want to teleport it to the position of another node. I want to move the mouse cursor with it. I tried using warp_mouse thingy, but it sends my mouse flying in weird directions.
I think I understand why this is happening, but I still have no idea how to fix it. How do I calculate the right Vector2 to move my mouse to? I have the position I need it to be at. Please help, thank you
Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the currently focused Window Manager game window.
You may need to translate the wizard position to the viewport’s. i.e. taking the wizard’s global position and subtracting the camera’s position
I fixed it! Swapped camera position for the position of camera’s top left corner. It kinda works, but only for certain screen resolution. I tweaked it so it works on my screen. Oh well, more problems for future me to solve