Created Teleport Boundry for it player falls out off the map they respawn

This commit is contained in:
Willow Behar
2024-06-02 15:26:14 -05:00
parent f33bd08826
commit 452c500937
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,14 @@
[gd_scene load_steps=3 format=3 uid="uid://dn2rvffy4bdtr"]
[ext_resource type="Script" path="res://Assets/scripts/TeleportBoundry.gd" id="1_tdj4j"]
[sub_resource type="BoxShape3D" id="BoxShape3D_h7x6y"]
size = Vector3(10000, 1, 10000)
[node name="TeleportBoundry" type="Area3D"]
script = ExtResource("1_tdj4j")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_h7x6y")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View File

@ -0,0 +1,4 @@
extends Area3D
func _on_body_entered(body):
body.respawn()