Added survivor detection of entering the elevator.

This commit is contained in:
Henry 2026-05-09 19:40:51 +01:00
parent d914608980
commit ecd79e66e3
2 changed files with 11 additions and 2 deletions

View file

@ -12,6 +12,7 @@ func _physics_process(delta):
velocity.z -= speed * delta
move_and_slide()
func _on_area_3d_area_entered(area: Area3D) -> void:
pass # Replace with function body.
var safety = %ElevatorSafeZone
if area == safety:
print("Safe!")

View file

@ -18,3 +18,11 @@ billboard = 1
double_sided = false
texture_filter = 0
texture = ExtResource("1_dvhww")
[node name="Area3D" type="Area3D" parent="." unique_id=1121777394]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D" unique_id=1505010263]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0)
shape = SubResource("CapsuleShape3D_q7pxf")
[connection signal="area_entered" from="Area3D" to="." method="_on_area_3d_area_entered"]