Spaming Mouse Rigthclick moves mouse by (-1, -1) coordinates
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: Official Release
Version: 4.1.0.1948 (.NET 6.0.11)
Platform(s): Windows 10 Pro
Describe the bug
basically title, but i could narrow the problem down a bit futher.
I susspect
Input.LockMousePosition() OR Input.UnlockMousePosition()
to be the problem.
Found in BasicCameraController from the basic Scripts that one can make in the InEditor Assets.
Here are 2 gifs ( a shame i forgot to capture the coursor in this one!!):
And here is one with faster spam and without breakpoints:
(as a bonus note: if one rightclicks on the maximum possible TOP position, the context of WindowsMS itself opens, moving focus away from the rendererWindow and freezing the mouse in place, only Escape can help here)
To Reproduce
Steps to reproduce the behavior:
- Empty project
- add the BasicCameraController from the basic Scripts that one can make in the InEditor Assets
- Add a Camera for main Slot
Expected behavior
Mouse should not be moved by the Script.
Screenshots
Gifs included above
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the BasicCameraController from the basic Scripts and inspect its use of Input.LockMousePosition() and Input.UnlockMousePosition(). Reproduce the issue in an empty project with a main-slot Camera by rapidly right-clicking, then verify that the mouse no longer moves by (-1, -1) and that the Windows context menu does not take focus.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100