ladder working
This commit is contained in:
@@ -1,15 +1,8 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://cgo4qyul7ix5p"]
|
||||
[gd_scene load_steps=7 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
|
||||
@@ -53,25 +46,16 @@ _surfaces = [{
|
||||
blend_shape_mode = 0
|
||||
shadow_mesh = SubResource("ArrayMesh_4hcxi")
|
||||
|
||||
[node name="Ladder" type="Node3D"]
|
||||
script = ExtResource("1_8cik3")
|
||||
[sub_resource type="ConvexPolygonShape3D" id="ConvexPolygonShape3D_wmqg7"]
|
||||
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)
|
||||
|
||||
[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="Ladder" type="StaticBody3D"]
|
||||
|
||||
[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"]
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" 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)
|
||||
shape = SubResource("ConvexPolygonShape3D_wmqg7")
|
||||
|
||||
16
assets/ladder_collision_check.tscn
Normal file
16
assets/ladder_collision_check.tscn
Normal file
@@ -0,0 +1,16 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://cdpxctwwi12j"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ladder.gd" id="1_ugi45"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_gxu3i"]
|
||||
size = Vector3(1, 8.23889, 1.6582)
|
||||
|
||||
[node name="LadderCollisionCheck" type="Area3D"]
|
||||
script = ExtResource("1_ugi45")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.67353, 0.329102)
|
||||
shape = SubResource("BoxShape3D_gxu3i")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
[connection signal="body_exited" from="." to="." method="_on_body_exited"]
|
||||
Reference in New Issue
Block a user