extends Camera3D

var target
var offset : Vector3

func _enter_tree() -> void:
	call_deferred("register_player")
	


func register_player() -> void:
	target = Game.player
	offset = global_position - target.global_position
	

func _process(delta: float) -> void:
	if target:
		global_position = target.global_position + offset
