Improved animations
This commit is contained in:
@ -1,17 +1,18 @@
|
||||
extends Camera3D
|
||||
|
||||
@export var center: Node3D
|
||||
@export var follow: Node3D
|
||||
@export var pivot: Node3D
|
||||
@export var follow_speed: float
|
||||
|
||||
func _ready():
|
||||
Global.camera = self
|
||||
look_at(center.position)
|
||||
look_at(pivot.position)
|
||||
|
||||
func _process(delta):
|
||||
if Global.player == null:
|
||||
return
|
||||
|
||||
center.position = lerp(center.position, Global.player.position, follow_speed * delta)
|
||||
follow.position = lerp(follow.position, Global.player.position, follow_speed * delta)
|
||||
|
||||
# @export var shake_strength: float
|
||||
# var noise = FastNoiseLite.new()
|
||||
|
Reference in New Issue
Block a user