grunk/src/util/translator_path_3d.gd

11 lines
312 B
GDScript3
Raw Normal View History

@tool
class_name TranslatorPath3D extends Path3D
## Keeps all child elements at the last point on the curve.
func _process(_delta: float) -> void:
if curve and curve.point_count > 1:
var endpoint := curve.get_point_position(curve.point_count - 1)
for c: Node3D in get_children():
c.position = endpoint