Use InputEventMouseMotion.screen_relative where relevant in all demos (#1232)

This provides mouse sensitivity that is independent of the viewport
size, without needing to query for project settings.

This also inverts the mouse motion direction in the 3D navigation demo
to better match expectations, and increases mouse sensitivity in the
Window Management demo to be closer to other demos.
This commit is contained in:
Hugo Locurcio
2025-10-02 03:54:19 +02:00
committed by GitHub
parent bdc33d1568
commit 5f4a9e409f
21 changed files with 38 additions and 51 deletions

View File

@@ -31,7 +31,6 @@ extends Node3D
@onready var camera1: Camera3D = viewport1.get_node(^"Camera1")
@onready var camera2: Camera3D = viewport2.get_node(^"Camera2")
var viewport_base_height := int(ProjectSettings.get_setting("display/window/size/viewport_height"))
func _ready() -> void:
_on_size_changed()