ladder kiiiiind of works

This commit is contained in:
Derek
2024-07-28 01:10:09 -05:00
parent e324ce829a
commit 1b883866da
4 changed files with 61 additions and 1 deletions

View File

@@ -1,8 +1,15 @@
[gd_scene load_steps=6 format=3 uid="uid://cgo4qyul7ix5p"]
[gd_scene load_steps=9 format=3 uid="uid://cgo4qyul7ix5p"]
[ext_resource type="Script" path="res://scripts/ladder.gd" id="1_8cik3"]
[ext_resource type="Texture2D" uid="uid://y7skmb07dvc7" path="res://assets/Models/latter1.albedo.png" id="1_sa5qp"]
[ext_resource type="Texture2D" uid="uid://3imms57ifxed" path="res://assets/Models/ladder1.normal.png" id="2_sljvk"]
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_a6qo5"]
points = PackedVector3Array(-0.314334, -0.509434, -0.0955157, 3.70923, 0.496458, 0.0930522, 3.70923, 0.496458, -0.0955157, -0.314334, 0.496458, 0.0930522, 3.70923, -0.509434, 0.0930522, 3.70923, -0.509434, -0.0955157, -0.314334, 0.496458, -0.0955157, -0.314334, -0.509434, 0.0930522)
[sub_resource type="BoxShape3D" id="BoxShape3D_gxu3i"]
size = Vector3(1, 4.30298, 1.6582)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_oksqm"]
resource_name = "ladder1"
cull_mode = 2
@@ -47,8 +54,24 @@ blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_4hcxi")
[node name="Ladder" type="Node3D"]
script = ExtResource("1_8cik3")
[node name="StaticBody3D" type="StaticBody3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(3.57628e-07, 1, 7.54979e-08, 1, -3.57628e-07, -7.54979e-08, -7.54979e-08, 7.54979e-08, -1, 0, 0, 0)
shape = SubResource("ConvexPolygonShape3D_a6qo5")
[node name="Area3D" type="Area3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.70557, 0.329102)
shape = SubResource("BoxShape3D_gxu3i")
[node name="Ladder1" type="MeshInstance3D" parent="."]
transform = Transform3D(3.57628e-07, 1, 7.54979e-08, 1, -3.57628e-07, -7.54979e-08, -7.54979e-08, 7.54979e-08, -1, 0, 0, 0)
mesh = SubResource("ArrayMesh_meake")
skeleton = NodePath("")
[connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"]
[connection signal="body_exited" from="Area3D" to="." method="_on_area_3d_body_exited"]