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

InputEventMouseMotion does not fire with captured mouse mode #90392

Closed
RedMser opened this issue Apr 8, 2024 · 2 comments
Closed

InputEventMouseMotion does not fire with captured mouse mode #90392

RedMser opened this issue Apr 8, 2024 · 2 comments

Comments

@RedMser
Copy link
Contributor

RedMser commented Apr 8, 2024

Tested versions

  • Reproducible in today's master: 0e50807
  • Not reproducible in Godot_v4.3-dev5

System information

Godot v4.3.dev (0e50807) - Windows 10.0.19044 - GLES3 (Compatibility) - NVIDIA GeForce RTX 2080 (NVIDIA; 31.0.15.5186) - Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 Threads)

Issue description

When using Input.mouse_mode = Input.MOUSE_MODE_CAPTURED, no InputEventMouseMotion events fire in _input or _unhandled_input. I believe this to be a regression from previous versions, as I don't see it documented anywhere.

Steps to reproduce

  • Create a Node + Script:
extends Node

func _ready() -> void:
	# this breaks mouse motion events - change mouse mode to have InputEventMouseMotion print
	Input.mouse_mode = Input.MOUSE_MODE_CAPTURED

func _input(event: InputEvent) -> void:
	print(event)

func _unhandled_input(event: InputEvent) -> void:
	print(event)
	
	# allow quitting via escape
	if event.is_action_pressed("ui_cancel"):
		get_tree().quit()
  • Run project and try moving the mouse
  • There is no prints for mouse movement

Minimal reproduction project (MRP)

bug--inputeventmousemotion-not-firing.zip

@AThousandShips
Copy link
Member

Can you try latest master? Could have been fixed by:

@RedMser
Copy link
Contributor Author

RedMser commented Apr 8, 2024

Thanks, it is indeed fixed.

@RedMser RedMser closed this as completed Apr 8, 2024
@AThousandShips AThousandShips added this to the 4.3 milestone Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants