Adding moving latform

This commit is contained in:
yannk 2022-02-04 13:59:18 +01:00
parent 2e0070e868
commit 07f277fe6f
4 changed files with 186 additions and 7 deletions

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://cem7wppuuoabv"]
[ext_resource type="PackedScene" uid="uid://dhqay3umgle6c" path="res://maps/basic_setup.tscn" id="1_s50i7"]
[ext_resource type="PackedScene" uid="uid://cvdmfc2hi172g" path="res://maps/basic_setup.tscn" id="1_s50i7"]
[ext_resource type="PackedScene" uid="uid://dwxrvijqyym70" path="res://player/player.tscn" id="2_bge2k"]
[node name="main_scene" type="Node3D"]

View file

@ -1,20 +1,199 @@
[gd_scene load_steps=4 format=3 uid="uid://dhqay3umgle6c"]
[gd_scene load_steps=9 format=3 uid="uid://cvdmfc2hi172g"]
[ext_resource type="Material" uid="uid://cdijyqa881tvv" path="res://maps/simple_grid.material" id="1_ympm1"]
[ext_resource type="Material" uid="uid://cdijyqa881tvv" path="res://maps/simple_grid_world.material" id="1_h84bv"]
[ext_resource type="Material" uid="uid://jrlyuynpu62b" path="res://maps/simple_grid.material" id="1_ympm1"]
[sub_resource type="BoxMesh" id="BoxMesh_k23th"]
material = ExtResource( "1_ympm1" )
material = ExtResource( "1_h84bv" )
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_y7uft"]
data = PackedVector3Array(-1, 1, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1, -1)
[sub_resource type="BoxShape3D" id="BoxShape3D_6y272"]
[sub_resource type="BoxMesh" id="BoxMesh_s0ird"]
[sub_resource type="Animation" id="Animation_4xqr7"]
resource_name = "MECH_moving_platform"
length = 10.0
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 5, 10),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [Vector3(5.30321, 0, 0), Vector3(-5.57525, 0, -1.90735e-06), Vector3(5.30321, 0, 0)]
}
[sub_resource type="Animation" id="Animation_c4u4e"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector3(5.30321, 0, 0)]
}
[node name="basic_setup" type="Node3D"]
[node name="floor" type="MeshInstance3D" parent="."]
transform = Transform3D(10, 0, 0, 0, 0.1, 0, 0, 0, 10, 0, -0.1, 0)
transform = Transform3D(30, 0, 0, 0, 0.1, 0, 0, 0, 30, 0, -0.1, 0)
mesh = SubResource( "BoxMesh_k23th" )
[node name="StaticBody3D" type="StaticBody3D" parent="floor"]
[node name="collision" type="StaticBody3D" parent="floor"]
[node name="@@22318" type="CollisionShape3D" parent="floor/StaticBody3D"]
[node name="shape" type="CollisionShape3D" parent="floor/collision"]
shape = SubResource( "ConcavePolygonShape3D_y7uft" )
[node name="ramp-complex" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.5717, 0, 15.2275)
[node name="ramp" type="MeshInstance3D" parent="ramp-complex"]
transform = Transform3D(1.69964, 0.0527074, 0, -1.05415, 0.0849819, 0, 0, 0, 2, 3.88877, 1, 1.27697)
mesh = SubResource( "BoxMesh_k23th" )
skeleton = NodePath("../..")
[node name="collision" type="StaticBody3D" parent="ramp-complex/ramp"]
[node name="shape" type="CollisionShape3D" parent="ramp-complex/ramp/collision"]
shape = SubResource( "BoxShape3D_6y272" )
[node name="ramp2" type="MeshInstance3D" parent="ramp-complex"]
transform = Transform3D(0, -2.98023e-09, 2, -1.05391, 0.0849893, 0, -1.69979, -0.0526956, 0, -2.71124, 1, -2.4059)
mesh = SubResource( "BoxMesh_k23th" )
skeleton = NodePath("../..")
[node name="collision" type="StaticBody3D" parent="ramp-complex/ramp2"]
[node name="shape" type="CollisionShape3D" parent="ramp-complex/ramp2/collision"]
shape = SubResource( "BoxShape3D_6y272" )
[node name="ramp-horizontal" type="MeshInstance3D" parent="ramp-complex"]
transform = Transform3D(3.503, 0, 0, 0, 0.1, 0, 0, 0, 2, -1.26628, 2, 1.27697)
mesh = SubResource( "BoxMesh_k23th" )
skeleton = NodePath("../..")
[node name="collision" type="StaticBody3D" parent="ramp-complex/ramp-horizontal"]
[node name="shape" type="CollisionShape3D" parent="ramp-complex/ramp-horizontal/collision"]
shape = SubResource( "BoxShape3D_6y272" )
[node name="wall" type="MeshInstance3D" parent="ramp-complex"]
transform = Transform3D(3.503, 0, 0, 0, 0, -2, 0, 0.1, 0, -1.26628, 2, 3.18398)
mesh = SubResource( "BoxMesh_k23th" )
skeleton = NodePath("../..")
[node name="collision" type="StaticBody3D" parent="ramp-complex/wall"]
[node name="shape" type="CollisionShape3D" parent="ramp-complex/wall/collision"]
shape = SubResource( "BoxShape3D_6y272" )
[node name="wall2" type="MeshInstance3D" parent="ramp-complex"]
transform = Transform3D(1.19209e-07, 0.1, 0, 0, 5.96046e-09, -2, -2, 0, 1.19209e-07, -4.7697, 2, 1.19322)
mesh = SubResource( "BoxMesh_k23th" )
skeleton = NodePath("../..")
[node name="collision" type="StaticBody3D" parent="ramp-complex/wall2"]
[node name="shape" type="CollisionShape3D" parent="ramp-complex/wall2/collision"]
shape = SubResource( "BoxShape3D_6y272" )
[node name="ramp-moving" type="Node3D" parent="."]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 11.952, 0, 15.2275)
[node name="ramp" type="MeshInstance3D" parent="ramp-moving"]
transform = Transform3D(1.69964, 0.0527074, 0, -1.05415, 0.0849819, 0, 0, 0, 2, 14.8888, 1, 1.27697)
mesh = SubResource( "BoxMesh_k23th" )
skeleton = NodePath("../..")
[node name="collision" type="StaticBody3D" parent="ramp-moving/ramp"]
[node name="shape" type="CollisionShape3D" parent="ramp-moving/ramp/collision"]
shape = SubResource( "BoxShape3D_6y272" )
[node name="ramp2" type="MeshInstance3D" parent="ramp-moving"]
transform = Transform3D(-1.69979, -0.0526956, -8.74228e-08, -1.05391, 0.0849893, 0, 1.14822e-08, 1.03494e-08, -2, -6.26628, 1, 1.27697)
mesh = SubResource( "BoxMesh_k23th" )
skeleton = NodePath("../..")
[node name="collision" type="StaticBody3D" parent="ramp-moving/ramp2"]
[node name="shape" type="CollisionShape3D" parent="ramp-moving/ramp2/collision"]
shape = SubResource( "BoxShape3D_6y272" )
[node name="moving" type="Node3D" parent="ramp-moving"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.71566, 0, 1.90735e-06)
[node name="AnimatableBody3D" type="AnimatableBody3D" parent="ramp-moving/moving"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.30321, 0, 0)
[node name="horizontal" type="CollisionShape3D" parent="ramp-moving/moving/AnimatableBody3D"]
transform = Transform3D(3.503, 0, 0, 0, 0.1, 0, 0, 0, 2, -1.26628, 2, 1.27697)
shape = SubResource( "BoxShape3D_6y272" )
[node name="MeshInstance3D" type="MeshInstance3D" parent="ramp-moving/moving/AnimatableBody3D/horizontal"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
mesh = SubResource( "BoxMesh_s0ird" )
surface_material_override/0 = ExtResource( "1_ympm1" )
[node name="AnimationPlayer" type="AnimationPlayer" parent="ramp-moving/moving/AnimatableBody3D"]
autoplay = "MECH_moving_platform"
anims/MECH_moving_platform = SubResource( "Animation_4xqr7" )
anims/RESET = SubResource( "Animation_c4u4e" )
[node name="obstacles" type="Node3D" parent="."]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 3, 0, 19)
[node name="obstacle1" type="MeshInstance3D" parent="obstacles"]
transform = Transform3D(1, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0.5, 0)
mesh = SubResource( "BoxMesh_k23th" )
skeleton = NodePath("../..")
[node name="collision" type="StaticBody3D" parent="obstacles/obstacle1"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0)
[node name="shape" type="CollisionShape3D" parent="obstacles/obstacle1/collision"]
shape = SubResource( "ConcavePolygonShape3D_y7uft" )
[node name="obstacle2" type="MeshInstance3D" parent="obstacles"]
transform = Transform3D(1, 0, 0, 0, 0.25, 0, 0, 0, 0.5, 2, 0.25, 0)
mesh = SubResource( "BoxMesh_k23th" )
skeleton = NodePath("../..")
[node name="collision" type="StaticBody3D" parent="obstacles/obstacle2"]
[node name="shape" type="CollisionShape3D" parent="obstacles/obstacle2/collision"]
shape = SubResource( "ConcavePolygonShape3D_y7uft" )
[node name="obstacle3" type="MeshInstance3D" parent="obstacles"]
transform = Transform3D(1, 0, 0, 0, 0.125, 0, 0, 0, 0.5, 4, 0.125, 0)
mesh = SubResource( "BoxMesh_k23th" )
skeleton = NodePath("../..")
[node name="collision" type="StaticBody3D" parent="obstacles/obstacle3"]
[node name="shape" type="CollisionShape3D" parent="obstacles/obstacle3/collision"]
shape = SubResource( "ConcavePolygonShape3D_y7uft" )
[node name="obstacle4" type="MeshInstance3D" parent="obstacles"]
transform = Transform3D(1, 0, 0, 0, 0.063, 0, 0, 0, 0.5, 6, 0.0625, 0)
mesh = SubResource( "BoxMesh_k23th" )
skeleton = NodePath("../..")
[node name="collision" type="StaticBody3D" parent="obstacles/obstacle4"]
[node name="shape" type="CollisionShape3D" parent="obstacles/obstacle4/collision"]
shape = SubResource( "ConcavePolygonShape3D_y7uft" )
[node name="moving-ramp" type="Node3D" parent="."]

Binary file not shown.

Binary file not shown.