checheche/Robo-Bus-A31-HMI/code/path_follow_2d_por.gd
2024-12-11 23:26:40 +08:00

10 lines
324 B
GDScript

@tool
extends PathFollow2D
@export var textureProgressBar : TextureProgressBar
@export var node : Node
func _physics_process(delta: float) -> void:
progress_ratio = textureProgressBar._value / textureProgressBar._max_value
node.global_position = lerp(node.global_position,global_position - node.size/2,15*delta)
pass