2024-02-09 23:10:51 +00:00
|
|
|
extends Node3D
|
|
|
|
|
|
|
|
@export var interpolate: bool
|
|
|
|
@export var speed: float
|
|
|
|
|
|
|
|
func _process(delta):
|
|
|
|
if Global.player == null:
|
|
|
|
return
|
|
|
|
|
|
|
|
if interpolate:
|
2024-02-16 11:51:05 +00:00
|
|
|
position = Math.damp(position, Global.player.position, speed * delta)
|
2024-02-09 23:10:51 +00:00
|
|
|
else:
|
|
|
|
position = Global.player.position
|
|
|
|
|