Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3D] Input mouse events depends of V-Sync mode enabled/disabled even in Compability mode #92360

Closed
ndbn opened this issue May 25, 2024 · 2 comments · Fixed by #92363
Closed

Comments

@ndbn
Copy link

ndbn commented May 25, 2024

Tested versions

4.2.2
4.3 dev6

System information

Windows 10 x64, 120hz monitor

Issue description

I've used code part for capturing mouse input

func _unhandled_input(_event: InputEvent) -> void:
  if _event is InputEventMouseMotion:
    var mouse_motion: InputEventMouseMotion = _event
    motion = mouse_motion.relative
    return

and seems like Vsync mode = Disabled causes to fire this event more often, about twice more times even in Compatibility mode, but description in Project Settings said It can be only Enabled with Compability

image

I'm not sure it wrong description of setting or compatibility renderer bug or some code firing InputEvents depends of this setting independent or renderer settings.

Steps to reproduce

MRP

Minimal reproduction project (MRP)

test_vsync_input.zip
move mouse left and right cyclically
press V for enable Vsync
press B for disable Vsync

@Calinou
Copy link
Member

Calinou commented May 25, 2024

The documentation on V-Sync mode is outdated, as disabling V-Sync is supported in the Compatibility rendering method at least since 4.2.

The fact that events are emitted more often with V-Sync is disabled is expected though. Input events are emitted once per rendered frame when input accumulation is enabled (which is the default), and your FPS can exceed the monitor refresh rate with V-Sync disabled.

@ndbn
Copy link
Author

ndbn commented May 25, 2024

If anyone found this Issue in searching a vsync-independent mouse input, above code must have just
motion += mouse_motion.relative

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

Successfully merging a pull request may close this issue.

2 participants