In main_camera.gd in _input you are setting the mouse mode to Input.MOUSE_MODE_CAPTURED, which locks the OS cursor position at the centre of the game window. You then use event.relative which gets the vector from the window centre to the mouse cursor, and add it to your internal mouse position. This works fine in theory because event.relative should only return the movement of the mouse cursor that frame (because the OS mouse position is set to the centre of the game window every frame.) However, in certain scenarios, Godot can’t actually set the OS cursor position, (I believe on web, for example) thus causing this to fail. The game cursor ends up moving the distance of the OS cursor from the window centre every frame instead of only once.
UnChiller
8
Posts
1
Following
A member registered Nov 03, 2024
Recent community posts
i got turned into a girl and this yuri death angel will only turn me back if i can find all the hidden props comments · Replied to spiders in i got turned into a girl and this yuri death angel will only turn me back if i can find all the hidden props comments
i got turned into a girl and this yuri death angel will only turn me back if i can find all the hidden props comments · Replied to Lapis in i got turned into a girl and this yuri death angel will only turn me back if i can find all the hidden props comments