I'm currently working on a segment for a game where you have a flashlight and need to guide it around your environment with the cursor. However, though after many hours I have managed to somewhat get this to work, the results are extremely offset from where they actually should be. Any recommendations?
Note: The code is under _physics_process, and its set to collide with a area body about 50 meters away from the camera