snake looking snakey

This commit is contained in:
Tabby 2025-08-08 15:27:48 +10:00
parent 23b21cefbb
commit 1c0fbf3d69
3 changed files with 13 additions and 4 deletions

View file

@ -2,6 +2,7 @@ extends Camera2D
var target : Node2D
@export var temp_segment : Node2D
@export var snake_line : Line2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
@ -18,8 +19,14 @@ func _process(delta: float) -> void:
if target:
# TODO FIX
position = lerp(position, target.position, 0.6 * delta)
zoom = lerp(zoom, Vector2(1,1),0.6 * delta)
#position = lerp(position, target.position, 0.6 * delta)
#zoom = lerp(zoom, Vector2(1,1),0.6 * delta)
position = target.position
zoom = Vector2(1,1)
snake_line.modulate = Color(1,1,1,0.5)
z_index = 0
else:
position = Vector2(0,0)
zoom = Vector2(0.05,0.05)
snake_line.modulate = Color(1,1,1,1)
z_index = 1