#5 développement du mouvement du robot et d'une caméra qui le suit

This commit is contained in:
2025-08-01 12:56:59 +02:00
parent 287a7a161f
commit b60c445592
9 changed files with 84 additions and 12 deletions

View File

@@ -0,0 +1,11 @@
extends Camera2D
class_name Camera
const LERP_WEIGHT = 0.9
@export var following : Node2D
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if following:
global_position = following.global_position.lerp(global_position, LERP_WEIGHT)