Describe the bug
When resetting an overridden cursor a new target mouse position is calculated in function reset.
This causes the cursor and its hotspot to move (in case there is a difference between the hotspot location of the original cursor and the overridden cursor).
To Reproduce
I created 2 test scenes with a walk hotspot to switch between the scenes.
In one of the scenes I added a cursor override:
Scenario 1: Use the 'Go Forward' cursor in both Walk Hotspots. The Custom1 cursor is not being used in the scenes.
Result: The 'Go Forward' cursor is moving with each 'Cursors.reset' call when switching the scene, although the Custom1 cursor is not being used.
Scenario 2: Use the 'CUSTOM1' cursor in both Walk Hotspots.
Result: Same result than scenario 1. The cursor is 'moving' with each scene change.
When setting target_mouse_position to null in function reset() the side effect of the moving hotspot is gone.
This is also identical to the behaviour in the override() function. Also there target_mouse_position is set to null.
I'll file a pull request later this week proposing an update to cursors.gd.
I use overridden cursors constantly. I've tested this in the two last playthroughs of my new game, and it has eradicated every single "moving" cursor, and has produced no side effects.
Describe the bug When resetting an overridden cursor a new target mouse position is calculated in function reset. This causes the cursor and its hotspot to move (in case there is a difference between the hotspot location of the original cursor and the overridden cursor).
To Reproduce I created 2 test scenes with a walk hotspot to switch between the scenes. In one of the scenes I added a cursor override:
Scenario 1: Use the 'Go Forward' cursor in both Walk Hotspots. The Custom1 cursor is not being used in the scenes. Result: The 'Go Forward' cursor is moving with each 'Cursors.reset' call when switching the scene, although the Custom1 cursor is not being used.
Scenario 2: Use the 'CUSTOM1' cursor in both Walk Hotspots. Result: Same result than scenario 1. The cursor is 'moving' with each scene change.
When setting target_mouse_position to null in function reset() the side effect of the moving hotspot is gone. This is also identical to the behaviour in the override() function. Also there target_mouse_position is set to null.
I'll file a pull request later this week proposing an update to cursors.gd.