Skip to content

Instantly share code, notes, and snippets.

View SamSuleymanov's full-sized avatar

Samir Suleymanov SamSuleymanov

View GitHub Profile
@SamSuleymanov
SamSuleymanov / GODOT Path2D visible and controllable in play mode
Last active June 10, 2023 13:02
Contribution to GODOT community. If you want to make Path2D visible and controllable in play/game mode, attach this script to the root node. Don't forget to check Emulate Touch From Mouse in Project settings / Pointing.
#NOTE!!!
#If you are using Godot 4+, replace "onready" with "@onready", "red" with "RED" and "update()" with "queue_redraw()"
extends Node2D
onready var path = get_node("Path2D")
var idx = 0
var c = Color.red
func _input(event):