From 07f277fe6f955c4ab235141f08c63610f17f3feb Mon Sep 17 00:00:00 2001 From: yannk Date: Fri, 4 Feb 2022 13:59:18 +0100 Subject: [PATCH] Adding moving latform --- main.tscn | 2 +- maps/basic_setup.tscn | 191 +++++++++++++++++++++++++++++++- maps/simple_grid.material | Bin 1013 -> 1019 bytes maps/simple_grid_world.material | Bin 0 -> 1015 bytes 4 files changed, 186 insertions(+), 7 deletions(-) create mode 100644 maps/simple_grid_world.material diff --git a/main.tscn b/main.tscn index 766c51d..41abc1f 100644 --- a/main.tscn +++ b/main.tscn @@ -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"] diff --git a/maps/basic_setup.tscn b/maps/basic_setup.tscn index f3a9a58..7f8f5e9 100644 --- a/maps/basic_setup.tscn +++ b/maps/basic_setup.tscn @@ -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="."] diff --git a/maps/simple_grid.material b/maps/simple_grid.material index 40f8763a35b68d36bbb3d959f704b4c7578a85c2..78d465325a75851bdf6960af60fa8afa7ca0c6cf 100644 GIT binary patch literal 1019 zcmVS zTShUMqbL~ET5Cj>aLc{dh9rc@z2*7VyH*P2&wYeXyvti0lAlrfl-4P00Bitq0O?-7 zhhbDTO%*z?UpCq{K~~6VmujsirCNqm%eDMR@JedQ=w3ta{|f#dI@FYG{~xck@+v#T zsT#+VVO#KQnI76k3)3!?iJyJR|0(>B`~Zo^fO2s|#(x1X;bEb2Hkwe3s$r}6|KJ1u zy-yqNY95W77;~j=+Dw^gf`#cRSjc!AMDn1vyp5c0D-CB$q*|i3`ku11@Lo2jd6rkU zhE75i8XP%z(zURYEyGV!vKf47_@So}zABf6=po`=n-C?NQ}Vy#?KHYjx739p%C+E= zz_^|i$=OR82m}IwJk;WyKyZxCLyQfVQ|`{kFxx@$a8__3$-@zO$P_zOM}tntO!6a= zaOtf)H;pZ*S)1_NB4I4RK%!E^LEo5}aWhx2|Svvn6JlIF4 zWEe!tu@2c}7lWYUmIEYGs7S%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a&dz+}S$!gdpl$x>Enhky zTx9X5zDp{$g2KqMIMerA^MlPx`Htltinw$Yr!>qAWfqC6+$q^7U(&)kSE^aDfD4ea zHebl^DihR6T!tnfBShI~^Jr=ahS zK7h)G`Mx{o;q()>)vL?2Tj6iXg>h_P<&t*0_dM>pNArnV-*^Ty`DF7p6dbj4^78}DVa{o!f)hJG&+%6x8@ z!l`M5SjKf^FbPF-Tvv@SlkdPj00j=n0!CbC5IHzdc?S=1cnwo*v69AdZd+Qd2`i2BGaa diff --git a/maps/simple_grid_world.material b/maps/simple_grid_world.material new file mode 100644 index 0000000000000000000000000000000000000000..84529cd5079ba1d5d0e42e26d47e1c5163acea1b GIT binary patch literal 1015 zcmVH)XyRck{g^?1`HBc-7F-~iHM9Ns45exSYXETo?&W(J zMpe^Pq4WA>qiqvpg`9S&)_PK^Wk|JL%m0j5QcFhn8gl`VS1;eX^HQdvmB0s)Hu0{%h6Lgj1>p%_)e?)cB(1OB_3 zN8={OT&bHjQ)X&lVR{D^GTsJ}Jg6;iBd6O+!`Tw4mZ+`1rz|JDm(6LO<&~|WlaK@j zM+=^GE$n3fF_z({DcK3WH2lz02Va%TLi7;vu1$!N%_;f6@pc+rs9Wm75an9%Jz!i< z$`A+y0(q##J89q;orf43E~ng`k6|{0Ex8|OH^a|co~KKPY_P{HBFDYSUg90sM_pj?jW<9H4k z2gin&`~gzp2k>^vsQ?90(~YM}A%iNdOexFmEzOm*85?xdb$LP`Qb|#!Jt{?maqPpe8>q5IGqNJ!e^NmyW9R_2zIo8|S zd_cI!>Q8@{RqO?X(X}|g?6;V_m