Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | arty3000 |
I have the below script attached to a Node2d object
func _process(delta):
update()
func _draw():
position = get_viewport().get_mouse_position()
draw_circle(position, 10, Color("#ff0000"))
print("circle position: " + str(self.position))
This script should simply draw a red circle on top of the mouse.
However, when I run the app the circle always 50ish pixels to the bottom right of the mouse position as the image shows. The Node the script is attached to is a child of the root node.
I don’t understand why?