Godot Version
4.6.2
Question
I am confused about get_local_mouse_position(). get_local_mouse_position() gives me different results based on the rotation of the Node2D. This is confusing to me. It means that the local position of the mouse can change even if the user doesn’t move the mouse. Is it possible to make get_local_mouse_position() stop doing that?
Here’s some example code that reproduces the issue:
extends Node
# Delta Unit: Seconds
func _physics_process(delta):
var center = get_node("Center")
var label = get_node("Label")
label.text = "get_local_mouse_position() Result: " + str(center.get_local_mouse_position())
var center_rotational_speed = 1 # Unit: Radians/Second
center.rotation = center.rotation + center_rotational_speed * delta
Or here’s a video that shows the issue:
