summaryrefslogtreecommitdiff
path: root/godot/scenes/environment/Ladder.tscn
diff options
context:
space:
mode:
Diffstat (limited to 'godot/scenes/environment/Ladder.tscn')
-rw-r--r--godot/scenes/environment/Ladder.tscn48
1 files changed, 48 insertions, 0 deletions
diff --git a/godot/scenes/environment/Ladder.tscn b/godot/scenes/environment/Ladder.tscn
new file mode 100644
index 0000000..ee99c68
--- /dev/null
+++ b/godot/scenes/environment/Ladder.tscn
@@ -0,0 +1,48 @@
+[gd_scene load_steps=7 format=2]
+
+[ext_resource path="res://scenes/environment/Ladder.gd" type="Script" id=1]
+
+[sub_resource type="ConvexPolygonShape" id=2]
+points = PoolVector3Array( 0.5, 0.5, 0.075, 0.5, 0.5, -0.075, -0.5, 0.5, 0.075, 0.5, -0.5, 0.075, 0.5, -0.5, -0.075, -0.5, 0.5, -0.075, -0.5, -0.5, 0.075, -0.5, -0.5, -0.075 )
+
+[sub_resource type="CubeMesh" id=1]
+size = Vector3( 1, 1, 0.15 )
+
+[sub_resource type="SpatialMaterial" id=4]
+albedo_color = Color( 0.764706, 0.764706, 0.764706, 1 )
+
+[sub_resource type="CubeMesh" id=5]
+material = SubResource( 4 )
+size = Vector3( 0.9, 1, 0.15 )
+
+[sub_resource type="GDScript" id=3]
+resource_name = "adjust_ladder_top"
+script/source = "extends Spatial
+
+#top of ladder path is above actual top so that player can easily dismount
+func _ready():
+ transform.origin.y += 0.2 / get_parent().scale.y
+"
+
+[node name="Ladder" type="Spatial"]
+script = ExtResource( 1 )
+
+[node name="LadderArea" type="Area" parent="."]
+
+[node name="CollisionShape" type="CollisionShape" parent="LadderArea"]
+shape = SubResource( 2 )
+
+[node name="DebugVisMesh" type="MeshInstance" parent="."]
+mesh = SubResource( 1 )
+
+[node name="DebugVisMesh2" type="MeshInstance" parent="DebugVisMesh"]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.0222434 )
+mesh = SubResource( 5 )
+skeleton = NodePath("../..")
+
+[node name="Bottom" type="Spatial" parent="."]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0.5 )
+
+[node name="Top" type="Spatial" parent="."]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0.5 )
+script = SubResource( 3 )