Merge pull request #622 from aaronfranke/waypoint-camera-current

Have waypoints check if the camera is current
This commit is contained in:
Aaron Franke
2021-05-29 03:19:57 -04:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -44,4 +44,3 @@ func ground_check():
_is_on_floor = true
else:
_is_on_floor = false

View File

@@ -23,6 +23,9 @@ func _ready() -> void:
func _process(_delta):
if not camera.current:
# If the camera we have isn't the current one, get the current camera.
camera = get_viewport().get_camera()
var parent_translation = parent.global_transform.origin
var camera_transform = camera.global_transform
var camera_translation = camera_transform.origin