godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.23k stars 21.04k forks source link

No mouse motion events over remote desktop when mouse mode is MOUSE_MODE_CAPTURED #60889

Open bentles opened 2 years ago

bentles commented 2 years ago

Godot version

v4.0.alpha7.official [3e9ead05f]

System information

Windows 10, Vulkan API 1.2.0 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1060 6GB

Issue description

This will not print anything if I move the mouse over remote desktop. Works fine locally

func _ready():
    Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

func _unhandled_input(event):
    if event is InputEventMouseMotion:
        print("hello")

Steps to reproduce

Create a new project with a node3d scene and add set the script to this:

extends Node3D

# Called when the node enters the scene tree for the first time.
func _ready():
    Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

func _unhandled_input(event):
    if event is InputEventMouseMotion:
        print("hello")

If you remote into the computer using windows remote desktop it will not produce any mouse motion events and hence "hello" will not be printed when you move the mouse

Minimal reproduction project

No response

Calinou commented 2 years ago

@bentles Does it work in Godot 3.4.4? Also, does it work if you make the project fullscreen (instead of running in window)?

Note that in general, mouse capture in remote desktop solutions will always be finnicky. Dedicated cloud streaming solutions like NVIDIA GameStream/Moonlight/Sunshine might fare better here.

bentles commented 2 years ago

It doesn't work full screen. Haven't tried 3.4.4 yet

Steveo8679 commented 11 months ago

Also an issue in v4.1.1.stable.mono.official [bd6af8e0e]

Below produces no output in fullscreen and window mode.

func _input(event: InputEvent) -> void: if event is InputEventMouseMotion: print(event)

SigmaLoop commented 7 months ago

Still an issue in v4.2.1.stable.mono.official [b09f793f5]

larry-fuqua commented 7 months ago

I've also just come across this (same godot v4.2.1 as above), which is keeping me from being able to fully do remote dev with my app. I am using Chrome Remote Desktop. Using similar print, I get no mouse event data written when using the captured mode. Also, I noticed that the mouse doesn't actually appear captured, as during the connection I still have a mouse showing and uncaptured (allowing me to acccess the right drawer to go into/out of remote full screen, and disconnect. In captured mode the event data should be raw, vs other modes. Is it possible that without capturing, the pipeline for the raw data isn't getting the data? Not sure how the underworkings work. Other mouse modes do receive data, for instance, I temporarily changed the mode to MOUSE_MODE_CONFINED_HIDDEN and received data, and other app states are using MOUSE_MODE_VISIBLE with no issues on receiving events.