disable camera tweening
This commit is contained in:
parent
05cd717984
commit
8906d69760
|
@ -41,8 +41,9 @@ func _process(delta):
|
||||||
if not camera_tweening:
|
if not camera_tweening:
|
||||||
camera.global_transform = %camera_spot.global_transform
|
camera.global_transform = %camera_spot.global_transform
|
||||||
else:
|
else:
|
||||||
camera.global_position = lerp(camera.global_position, %camera_spot.global_position, 0.00000000001)
|
camera_tweening = false
|
||||||
camera.global_rotation = lerp(camera.global_rotation, %camera_spot.global_rotation, 0.00000000001)
|
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
|
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:
|
if (camera.global_position - %camera_spot.global_position).length() <= epsilon and (camera.global_rotation - %camera_spot.global_rotation).length() <= epsilon:
|
||||||
camera_tweening = false
|
camera_tweening = false
|
||||||
|
|
Loading…
Reference in New Issue