Skip to content

Overhaul mouse input system and look-around camera#1278

Open
adfriz wants to merge 2 commits into
leezer3:masterfrom
adfriz:mouse-input
Open

Overhaul mouse input system and look-around camera#1278
adfriz wants to merge 2 commits into
leezer3:masterfrom
adfriz:mouse-input

Conversation

@adfriz

@adfriz adfriz commented Apr 26, 2026

Copy link
Copy Markdown
Contributor
  • Implement smooth mouse look-around using System.Windows.Forms.Cursor.
  • Fix camera spinning and choppiness by bypassing OpenTK event lag.
  • Add dynamic sensitivity scaling based on zoom level (FOV).
  • Add support for mouse scroll and extra buttons in input processing.
  • Update Indonesian and English translations for new mouse controls.
  • Add default control mappings for mouse input.

Note: there is a small bug, if we in look around mode (right click mouse) and look backward, anything not loaded like got culled and it need to be triggerd by something like moving the camera position a bit or use arrow key once.

@leezer3 i need your help about that bug.

@adfriz

adfriz commented Apr 26, 2026

Copy link
Copy Markdown
Contributor Author

preview, i set scroll up/down as zoom in/out and we can do interesting stuff like dolly zoom.

*i need to compress this video because github upload limit

Screen.Recording.2026-04-26.1114382.mp4

@leezer3

leezer3 commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Hmm.

The issue with using the System.Windows.Forms.Cursor approach is going to be on platforms other than Windows- Without checking specifically, it's unlikely to work at all on Mac, and Linux may or may not work.

To immediately fix your bug, set the alignment direction, not the alignment directly.
Alternatively, you can call the UpdateViewingDistances method from the renderer.
By setting the aligment directly, you're bypassing the viewing distances update, and so the camera still thinks it's got the same backwards viewing distance as when it's pointing forwards.

- Implement smooth mouse look-around using System.Windows.Forms.Cursor.
- Fix camera spinning and choppiness by bypassing OpenTK event lag.
- Add dynamic sensitivity scaling based on zoom level (FOV).
- Add support for mouse scroll and extra buttons in input processing.
- Update Indonesian and English translations for new mouse controls.
- Add default control mappings for mouse input.
… setting with max limit, and update localization.
@adfriz

adfriz commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

ok its done.

@leezer3 please check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants