mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 23:10:08 +01:00
Have waypoints check if the camera is current
If not, get the current camera.
This commit is contained in:
@@ -44,4 +44,3 @@ func ground_check():
|
||||
_is_on_floor = true
|
||||
else:
|
||||
_is_on_floor = false
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user