You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
378 B
GDScript
14 lines
378 B
GDScript
extends Node3D
|
|
|
|
@onready var cursor := load('res://assets/transparent_cursor.png')
|
|
|
|
func _ready():
|
|
Input.mouse_mode = Input.MOUSE_MODE_CONFINED
|
|
Input.set_custom_mouse_cursor(cursor)
|
|
|
|
func _input(event):
|
|
if event.is_action_pressed("ui_cancel"):
|
|
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
|
elif event is InputEventMouseButton:
|
|
Input.mouse_mode = Input.MOUSE_MODE_CONFINED
|