mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-25 09:34:24 +00:00
12 lines
268 B
GDScript3
12 lines
268 B
GDScript3
|
extends Node2D
|
||
|
class_name Cursor
|
||
|
|
||
|
## A [Node2D] syncing its position with the mouse on each physics timestep.
|
||
|
|
||
|
|
||
|
@onready var game := MainGame.get_ancestor(self)
|
||
|
|
||
|
|
||
|
func _physics_process(_delta: float) -> void:
|
||
|
global_position = game.camera.get_global_mouse_position()
|