12 lines
312 B
GDScript3
12 lines
312 B
GDScript3
|
|
extends Camera3D
|
||
|
|
|
||
|
|
@onready var player = get_parent().get_node("Player")
|
||
|
|
@onready var offset = position - player.position
|
||
|
|
|
||
|
|
func _ready() -> void:
|
||
|
|
pass
|
||
|
|
|
||
|
|
func _process(delta: float) -> void:
|
||
|
|
var goal_position = player.global_position + offset
|
||
|
|
global_position += (goal_position - global_position) / (500 * delta)
|