Skip to content

Commit ca17967

Browse files
authored
Merge pull request #622 from aaronfranke/waypoint-camera-current
Have waypoints check if the camera is current
2 parents 08be1b7 + 491fb26 commit ca17967

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

3d/physics_tests/utils/rigidbody_ground_check.gd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@ func ground_check():
4444
_is_on_floor = true
4545
else:
4646
_is_on_floor = false
47-

3d/waypoints/waypoint.gd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ func _ready() -> void:
2323

2424

2525
func _process(_delta):
26+
if not camera.current:
27+
# If the camera we have isn't the current one, get the current camera.
28+
camera = get_viewport().get_camera()
2629
var parent_translation = parent.global_transform.origin
2730
var camera_transform = camera.global_transform
2831
var camera_translation = camera_transform.origin

0 commit comments

Comments
 (0)