mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-05 23:40:07 +01:00
14 lines
312 B
GDScript
14 lines
312 B
GDScript
@tool
|
|
@icon("res://marker/AxisMarker2D.svg")
|
|
class_name AxisMarker2D
|
|
extends Node2D
|
|
|
|
|
|
func _process(_delta):
|
|
var line: Line2D = get_child(0).get_child(0)
|
|
var marker_parent = get_parent()
|
|
|
|
line.points[1] = transform.origin
|
|
if marker_parent as Node2D != null:
|
|
line.transform = marker_parent.global_transform
|