Moving the camera makes the mouse X/Y project variables useless, anything tied to them gets misplaced.

AGMaker Version: v1.2.10.stable
OS: Windows 10 IoT Enterprise LTSC 21H2 (OS Build: 19044.7184)
CPU: AMD Ryzen 7 5700X3D
GPU: AMD Radeon RX 9070 XT
Memory size: 32 GB (2x16 GB @ 3200 MHz)
Symptoms: Mouse X and Y positions are off if the camera moves away from its initial spot (X=0, Y=0)
Steps to reproduce:

  • Make and object that is the focus of the camera and can move around freely.
  • Make another object with two action boxes looping back and forth between them, each action box changing the X and Y position of the object to the X and Y positions of the mouse, stored as project variables.
  • Put those objects in a scene and ensure the camera targets the first object.
  • Test the project.
  • You will see that, the further away the camera moves from the 0 position, the further the mouse object becomes separated from the system’s mouse cursor.

Here is a simple project to showcase the problem better: https://drive.google.com/file/d/1J5iJrSVV2NwM5UwyNtuSYchsgEdwqPc1/view?usp=sharing

You can move the camera around with WASD/ArrowKeys/D-Pad/Left Joystick/Right Joystick and observe how the object attached to the Mouse X/Y positions slowly drifts away from the actual system cursor.

Hope this gets fixed soon!

Thank you for the thorough report and the project, it was very helpful! I was able to confirm the bug and will get it reported.

In the meantime I put together a simple (visual script friendly) workaround script that gives you accurate world space mouse coordinates even when the camera has moved. It also includes some handy extras like checking if the mouse is inside the viewport. You can call it with InvokeScript or ScriptConditionEvaluator depending on what you need.

baz_mouse_position.gd (2.6 KB)