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