disable camera tweening

This commit is contained in:
Spencer Killen 2023-11-11 20:56:47 -07:00
parent 05cd717984
commit 8906d69760
Signed by: sjkillen
GPG Key ID: 3AF3117BA6FBB75B
1 changed files with 3 additions and 2 deletions

View File

@ -41,8 +41,9 @@ func _process(delta):
if not camera_tweening:
camera.global_transform = %camera_spot.global_transform
else:
camera.global_position = lerp(camera.global_position, %camera_spot.global_position, 0.00000000001)
camera.global_rotation = lerp(camera.global_rotation, %camera_spot.global_rotation, 0.00000000001)
camera_tweening = false
camera.global_position = lerp(camera.global_position, %camera_spot.global_position, delta)
camera.global_rotation = lerp(camera.global_rotation, %camera_spot.global_rotation, delta)
var epsilon: float = 0.0001
if (camera.global_position - %camera_spot.global_position).length() <= epsilon and (camera.global_rotation - %camera_spot.global_rotation).length() <= epsilon:
camera_tweening = false