From 9012cd408e240d6039120e56fdd47a0983890993 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 13 Jan 2015 21:19:11 -0300 Subject: [PATCH] -Add support for one-way collision in 2D (only works for kinematic body so far) -Solve drawing order bug introduced in previous commit: solves #1214 --- demos/2d/kinematic_char/colworld.scn | Bin 5090 -> 6367 bytes demos/2d/kinematic_char/player.gd | 5 +- demos/2d/kinematic_char/player.scn | Bin 1511 -> 1728 bytes demos/2d/platformer/stage.xml | 709 +++++++++++++++++++- scene/2d/physics_body_2d.cpp | 24 +- scene/2d/physics_body_2d.h | 4 + servers/physics_2d/body_2d_sw.cpp | 1 + servers/physics_2d/body_2d_sw.h | 4 + servers/physics_2d/physics_2d_server_sw.cpp | 30 + servers/physics_2d/physics_2d_server_sw.h | 6 + servers/physics_2d/space_2d_sw.cpp | 79 ++- servers/physics_2d_server.cpp | 3 + servers/physics_2d_server.h | 3 + servers/visual/visual_server_raster.h | 2 +- 14 files changed, 827 insertions(+), 43 deletions(-) diff --git a/demos/2d/kinematic_char/colworld.scn b/demos/2d/kinematic_char/colworld.scn index b3a0a1f168e44f6f2815c01eb38fe16b726133a0..7b79a1d887e07370da20522a537ba5b6be161e11 100644 GIT binary patch literal 6367 zcmcgxeRLbumA^A1X>2L}h@Dt*9LG*}U?sx5dBCHGgL3Ackj-c*v)jn@h0=zpPAt#p zrqQ2?>YV+(uO20ozde7BbA$=Hh`&a5|er= zp6vlQYZ8)%kyc9tGpnc7=h-nK+G~cG!4IW%+dYv>Yiu!8vc)z8U5Qjy&)A+NLa#n# zs%ELu)t`zb^%%I=Li{~!$Q_a@0)g@iLm{Kf%xcl3J};e$+vSa7I+I96b<U1TIsFq~k<>$i}(lG|M zFqvNfbES_?KQ4rqZSQ1$5u9{>TH$;t>IfuZG4y&^6$9`xAwSHY5Bu<)(?gcPTTb5# zpiElJ0DoJ$UXNzAR6MD7hB!6PpN<)WsgY+} zJ?}jIR2blHt<^5|?YPwPk1TDK){cIi9Q7sT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ld2vPbqB0%+)hXFK%@4E{MQA7JAYeriB@*V?X2M@^uB&i#!WWUulG$r&d;DdM z#sAj|A1uo(y>qs+zF)M;ba3CPUG>P#*88rQ{gdy(e7I}#@l8*=uhNaZW-PMz;-PnZ zX)|+KDD?m50XvUS^%WW5jDlWaUE`e!lR+7o!!T|g`2dB(ZoaS)8~}&&j=Uy#&IC7L z2nR=a_ciAJY>t`?02KFgb~M!LHWKE_RB|kEqyTq3jiY&o6K3vrs$l3Iyq+Q{;?4AR zh7UDJZ?eNo5X$%Xim$GC8S6ZMeCqph-|l;r7Jw??$)t<2zlDG&peg{7GC7xu*;7eM zcn>|6=4j7fkxSj+W(@^DLbk}?5%~PgRNk+4 zE9r$5yo?+#)nvj?6n*?*xtVH-G6n=HjbnvA4iHar%Ya2^4>on=lMpBla)qDaAkKM` zR16tlwDAwwP4HF0H2V0>OHsmtng@8}PDP6wn}{ zVNw{zJp^UC{R=1=REcZQ3w4wO^?4@Z6!^-xtlhwBVF4wYO?naBNGuFe!Y-in?ZaEh z;4QeCKy-v7c#9(*k^YKz!$P)!@FKFYT{?{s@H1+b@-hTy#d5;8RWi4ox$y3a1xiNd zf^t4Tg!#8=Ux3sj9PdMP0`Vd0J!^0lIv6=o$VPyR!F9sHVF;2ligMW` zbP*kaZaPg56Qv&cMHHcz`K0x*oaXDHkJdx5f@m^V_694-eLuNBAq#oBCcU^GE~aHK z3=pJ}URk3qB=3FZy6TGh{z(V4^a^T@DBDhAW7Sz(yvPAp8sR zc>;e;@%Y$^&zUho$ g*vaI~S*&~hMYw^UGJBZdrHZTkc0_h4 -WALK_MAX_SPEED): + if (velocity.x<=WALK_MIN_SPEED and velocity.x > -WALK_MAX_SPEED): force.x-=WALK_FORCE stop=false elif (walk_right): - if (velocity.x>=0 and velocity.x < WALK_MAX_SPEED): + if (velocity.x>=-WALK_MIN_SPEED and velocity.x < WALK_MAX_SPEED): force.x+=WALK_FORCE stop=false diff --git a/demos/2d/kinematic_char/player.scn b/demos/2d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fRj+$cqE zCs*Qf97rp_w*8ZS2@U*Im<~N#A}Y%np6#e*voZ%jRSbc-iQjx_fiDhYCywEOoRRd3 z<0S6WEN2*h<@fO^cmm_;n|A}}ghGzS@%6+-+>Q}kC?9St8+)0lx|UX^yAdAMA?>s6 z68&3x|HgNSt#UxL^KPylKDx1X#hiTX3dV5=`fJeZ zV}3)&;8#+`Wh!BzqFt~p&GZBJfBYp^zhe*usfP#d97l4s%aF8`-ke?%AX;(Xzx)A&b$G|s83fkIvwmaBVhS~ zF6EB6&tmUwk*;06x(W|x-n2c?6 z0!G`?CCvD6gY#N_w`nq%8lHQaXZ2B zT1>(eTuDH_hmaZNwh>{?DNN%5Ot0UHY5r8uL7HU2Uw#2P$yz+Q?h6F@6}%;Xj2ALz zF$`T?mu|t#i7<4NFisBc!AY1+T5!IctzWMLBuE3F;|q8jRerNy9+LYxtN(G7<0Njw g - + - + - - + + "names" - + "stage" "Node" "_import_path" @@ -25,13 +25,16 @@ "transform/pos" "transform/rot" "transform/scale" - "cell_size" - "quadrant_size" + "mode" "tile_set" - "tile_data" + "cell/size" + "cell/quadrant_size" + "cell/custom_transform" + "cell/half_offset" "collision/friction" "collision/bounce" "collision/layers" + "tile_data" "coins" "coin" "Area2D" @@ -142,7 +145,7 @@ "node_count" 66 "variants" - + "" "__editor_plugin_states__" @@ -174,11 +177,161 @@ "3D" + "deflight_rot_y" + 0.628319 "zfar" 500 "fov" 45 "viewports" + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "listener" + True + "use_environment" + False + "use_orthogonal" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "listener" + False + "use_environment" + False + "use_orthogonal" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "listener" + False + "use_environment" + False + "use_orthogonal" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "listener" + False + "use_environment" + False + "use_orthogonal" + False + "pos" + 0, 0, 0 + + + "viewport_mode" + 1 + "default_light" + True + "ambient_light_color" + 0.15, 0.15, 0.15, 1 + "show_grid" + True + "show_origin" + True + "znear" + 0.1 + "default_srgb" + False + "deflight_rot_x" + 0.942478 + + + "__editor_run_settings__" + + "custom_args" + "-l $scene" + "run_mode" + 0 + + "__editor_plugin_screen__" + "Script" + + True + 1 + False + 0, 0 + 0 + 1, 1 + 0 + + 64, 64 + 16 + 1, 0, 0, 1, 0, 0 + 2 + 1 + 0, 2, 70, 536870914, 71, 10, 72, 10, 73, 10, 74, 10, 75, 10, 76, 10, 77, 10, 78, 10, 65536, 2, 65606, 536870914, 65607, 10, 65608, 10, 65609, 10, 65610, 10, 65611, 10, 65612, 10, 65613, 10, 65614, 10, 131072, 2, 131142, 536870914, 131143, 10, 131144, 10, 131145, 10, 131146, 10, 131147, 10, 131148, 10, 131149, 10, 131150, 10, 196608, 2, 196626, 9, 196678, 536870914, 196679, 10, 196680, 10, 196681, 10, 196682, 10, 196683, 10, 196684, 10, 196685, 10, 196686, 10, 262144, 2, 262162, 8, 262214, 536870914, 262215, 10, 262216, 10, 262217, 10, 262218, 10, 262219, 10, 262220, 10, 262221, 10, 262222, 10, 327680, 2, 327697, 536870921, 327698, 7, 327733, 9, 327750, 536870914, 327751, 10, 327752, 10, 327753, 10, 327754, 10, 327755, 10, 327756, 10, 327757, 10, 327758, 10, 393216, 2, 393233, 536870920, 393234, 7, 393257, 9, 393269, 7, 393286, 536870914, 393287, 10, 393288, 10, 393289, 10, 393290, 10, 393291, 10, 393292, 10, 393293, 10, 393294, 10, 458752, 2, 458769, 7, 458770, 8, 458790, 9, 458793, 8, 458805, 8, 458822, 536870914, 458823, 10, 458824, 10, 458825, 10, 458826, 10, 458827, 10, 458828, 10, 458829, 10, 458830, 10, 524288, 4, 524289, 1, 524304, 536870913, 524305, 536870918, 524306, 6, 524307, 5, 524308, 1, 524326, 8, 524329, 7, 524341, 7, 524358, 536870914, 524359, 10, 524360, 10, 524361, 10, 524362, 10, 524363, 10, 524364, 10, 524365, 10, 524366, 10, 589824, 10, 589825, 13, 589840, 536870914, 589841, 10, 589842, 10, 589843, 10, 589844, 2, 589862, 7, 589865, 7, 589876, 536870913, 589877, 6, 589878, 1, 589894, 536870914, 589895, 10, 589896, 10, 589897, 10, 589898, 10, 589899, 10, 589900, 10, 589901, 10, 589902, 10, 655360, 2, 655376, 536870914, 655377, 10, 655378, 10, 655379, 10, 655380, 2, 655398, 7, 655401, 8, 655412, 536870925, 655413, 11, 655414, 13, 655430, 536870914, 655431, 10, 655432, 10, 655433, 10, 655434, 10, 655435, 10, 655436, 10, 655437, 10, 655438, 10, 720896, 2, 720912, 536870914, 720913, 10, 720914, 10, 720915, 10, 720916, 2, 720934, 8, 720937, 7, 720958, 536870913, 720959, 5, 720960, 536870917, 720961, 5, 720962, 5, 720963, 536870917, 720964, 5, 720965, 0, 720966, 536870916, 720967, 10, 720968, 10, 720969, 10, 720970, 10, 720971, 10, 720972, 10, 720973, 10, 720974, 10, 786432, 2, 786437, 9, 786448, 536870914, 786449, 10, 786450, 10, 786451, 10, 786452, 2, 786464, 536870913, 786465, 1, 786470, 7, 786473, 7, 786474, 536870924, 786475, 1, 786494, 536870914, 786495, 10, 786496, 10, 786497, 10, 786498, 10, 786499, 10, 786500, 10, 786501, 10, 786502, 10, 786503, 10, 786504, 10, 786505, 10, 786506, 10, 786507, 10, 786508, 10, 786509, 10, 851968, 2, 851973, 7, 851984, 536870914, 851985, 10, 851986, 10, 851987, 10, 851988, 2, 851996, 536870913, 851997, 1, 852000, 536870914, 852001, 3, 852006, 7, 852009, 536870913, 852011, 2, 852030, 536870914, 852031, 10, 852032, 10, 852033, 10, 852034, 10, 852035, 10, 852036, 10, 852037, 10, 852038, 10, 852039, 10, 852040, 10, 852041, 10, 852042, 10, 852043, 10, 852044, 10, 852045, 10, 917504, 2, 917506, 9, 917509, 7, 917512, 536870921, 917520, 536870925, 917521, 11, 917522, 11, 917523, 11, 917524, 13, 917532, 536870925, 917533, 13, 917536, 536870914, 917537, 4, 917538, 1, 917540, 536870913, 917541, 0, 917542, 1, 917545, 536870914, 917546, 10, 917547, 4, 917548, 1, 917566, 536870914, 917567, 10, 917568, 10, 917569, 10, 917570, 10, 917571, 10, 917572, 10, 917573, 10, 917574, 10, 917575, 10, 917576, 10, 917577, 10, 917578, 10, 917579, 10, 917580, 10, 917581, 10, 983040, 2, 983042, 7, 983045, 7, 983048, 536870920, 983050, 536870913, 983051, 1, 983064, 536870913, 983065, 1, 983072, 536870914, 983073, 10, 983074, 4, 983075, 0, 983076, 536870916, 983077, 10, 983078, 4, 983079, 536870912, 983080, 536870912, 983081, 536870916, 983082, 10, 983083, 10, 983084, 2, 983095, 9, 983102, 536870914, 983103, 10, 983104, 10, 983105, 10, 983106, 10, 983107, 10, 983108, 10, 983109, 10, 983110, 10, 983111, 10, 983112, 10, 983113, 10, 983114, 10, 983115, 10, 983116, 10, 983117, 10, 1048576, 2, 1048578, 8, 1048581, 8, 1048584, 536870919, 1048586, 536870925, 1048587, 13, 1048600, 536870925, 1048601, 13, 1048604, 9, 1048608, 536870925, 1048609, 536870923, 1048610, 536870923, 1048611, 536870923, 1048612, 10, 1048613, 10, 1048614, 10, 1048615, 10, 1048616, 10, 1048617, 10, 1048618, 10, 1048619, 10, 1048620, 4, 1048621, 1, 1048630, 536870921, 1048631, 8, 1048638, 536870914, 1048639, 10, 1048640, 10, 1048641, 10, 1048642, 10, 1048643, 10, 1048644, 10, 1048645, 10, 1048646, 10, 1048647, 10, 1048648, 10, 1048649, 10, 1048650, 10, 1048651, 10, 1048652, 10, 1048653, 10, 1114112, 4, 1114113, 0, 1114114, 6, 1114115, 0, 1114116, 0, 1114117, 6, 1114118, 1, 1114120, 536870920, 1114128, 536870913, 1114129, 5, 1114130, 536870917, 1114131, 5, 1114132, 0, 1114133, 1, 1114140, 7, 1114141, 536870921, 1114148, 536870914, 1114149, 10, 1114150, 10, 1114151, 10, 1114152, 10, 1114153, 10, 1114154, 10, 1114155, 10, 1114156, 10, 1114157, 2, 1114166, 536870920, 1114167, 8, 1114174, 536870914, 1114175, 10, 1114176, 10, 1114177, 10, 1114178, 10, 1114179, 10, 1114180, 10, 1114181, 10, 1114182, 10, 1114183, 10, 1114184, 10, 1114185, 10, 1114186, 10, 1114187, 10, 1114188, 10, 1179648, 10, 1179649, 10, 1179650, 10, 1179651, 10, 1179652, 10, 1179653, 10, 1179654, 2, 1179656, 536870919, 1179663, 536870915, 1179665, 10, 1179666, 10, 1179667, 10, 1179668, 10, 1179669, 4, 1179670, 12, 1179675, 9, 1179676, 8, 1179677, 8, 1179684, 536870914, 1179685, 10, 1179686, 10, 1179687, 10, 1179688, 10, 1179689, 10, 1179690, 10, 1179691, 10, 1179692, 10, 1179693, 4, 1179694, 1, 1179701, 9, 1179702, 536870919, 1179703, 7, 1179710, 536870914, 1179711, 10, 1179712, 10, 1179713, 10, 1179714, 10, 1179715, 10, 1179716, 10, 1179717, 10, 1179718, 10, 1179719, 10, 1179720, 10, 1179721, 10, 1179722, 10, 1245184, 10, 1245185, 10, 1245186, 10, 1245187, 10, 1245188, 10, 1245189, 10, 1245190, 2, 1245192, 536870919, 1245199, 536870913, 1245200, 536870916, 1245201, 10, 1245202, 10, 1245203, 10, 1245204, 10, 1245205, 10, 1245207, 1, 1245211, 7, 1245212, 7, 1245213, 536870920, 1245220, 536870914, 1245221, 10, 1245222, 10, 1245223, 10, 1245224, 10, 1245225, 10, 1245226, 10, 1245227, 10, 1245228, 10, 1245229, 10, 1245230, 2, 1245237, 8, 1245238, 536870919, 1245239, 8, 1245240, 536870921, 1245246, 536870914, 1245247, 10, 1245248, 10, 1245249, 10, 1245250, 10, 1245251, 10, 1245252, 10, 1245253, 10, 1245254, 10, 1245255, 10, 1245256, 10, 1245257, 10, 1245258, 10, 1310720, 10, 1310721, 10, 1310722, 10, 1310723, 10, 1310724, 10, 1310725, 10, 1310726, 2, 1310728, 536870920, 1310730, 536870913, 1310731, 1, 1310734, 536870913, 1310735, 536870916, 1310736, 10, 1310737, 10, 1310738, 10, 1310739, 10, 1310740, 10, 1310741, 10, 1310742, 10, 1310743, 4, 1310744, 1, 1310747, 8, 1310748, 7, 1310749, 536870919, 1310756, 536870914, 1310757, 10, 1310758, 10, 1310759, 10, 1310760, 10, 1310761, 10, 1310762, 10, 1310763, 10, 1310764, 10, 1310765, 10, 1310766, 4, 1310767, 5, 1310768, 12, 1310773, 7, 1310774, 536870919, 1310775, 7, 1310776, 536870919, 1310782, 536870914, 1310783, 10, 1310784, 10, 1310785, 10, 1310786, 10, 1310787, 10, 1310788, 10, 1310789, 10, 1310790, 10, 1310791, 10, 1310792, 10, 1310793, 10, 1376256, 10, 1376257, 10, 1376258, 10, 1376259, 10, 1376260, 10, 1376261, 10, 1376262, 4, 1376263, 0, 1376264, 536870918, 1376265, 0, 1376266, 536870916, 1376267, 4, 1376268, 0, 1376269, 0, 1376270, 536870916, 1376271, 10, 1376272, 10, 1376273, 10, 1376274, 10, 1376275, 10, 1376276, 10, 1376277, 10, 1376278, 10, 1376279, 10, 1376280, 4, 1376281, 12, 1376283, 8, 1376284, 8, 1376285, 536870920, 1376287, 536870924, 1376288, 0, 1376289, 5, 1376290, 536870917, 1376291, 0, 1376292, 536870916, 1376293, 10, 1376294, 10, 1376295, 10, 1376296, 10, 1376297, 10, 1376298, 10, 1376299, 10, 1376300, 10, 1376301, 10, 1376302, 10, 1376303, 10, 1376305, 12, 1376309, 7, 1376310, 536870920, 1376311, 7, 1376312, 536870920, 1376318, 536870914, 1376319, 10, 1376320, 10, 1376321, 10, 1376322, 10, 1376323, 10, 1376324, 10, 1376325, 10, 1376326, 10, 1376327, 10, 1376328, 10, 1441792, 10, 1441793, 10, 1441794, 10, 1441795, 10, 1441796, 10, 1441797, 10, 1441798, 10, 1441799, 10, 1441800, 10, 1441801, 10, 1441802, 10, 1441803, 10, 1441804, 10, 1441805, 10, 1441806, 10, 1441807, 10, 1441808, 10, 1441809, 10, 1441810, 10, 1441811, 10, 1441812, 10, 1441813, 10, 1441814, 10, 1441815, 10, 1441816, 10, 1441818, 0, 1441819, 6, 1441820, 6, 1441821, 536870918, 1441822, 5, 1441824, 10, 1441825, 10, 1441826, 10, 1441827, 10, 1441828, 10, 1441829, 10, 1441830, 10, 1441831, 10, 1441832, 10, 1441833, 10, 1441834, 10, 1441835, 10, 1441836, 10, 1441837, 10, 1441838, 10, 1441839, 10, 1441840, 10, 1441842, 0, 1441843, 0, 1441844, 0, 1441845, 6, 1441846, 536870918, 1441847, 6, 1441848, 536870918, 1441849, 0, 1441850, 5, 1441851, 536870917, 1441852, 5, 1441853, 0, 1441854, 536870916, 1441855, 10, 1441856, 10, 1441857, 10, 1441858, 10, 1441859, 10, 1441860, 10, 1441861, 10, 1441862, 10, 1441863, 10, 1507328, 10, 1507329, 10, 1507330, 10, 1507331, 10, 1507332, 10, 1507333, 10, 1507334, 10, 1507335, 10, 1507336, 10, 1507337, 10, 1507338, 10, 1507339, 10, 1507340, 10, 1507341, 10, 1507342, 10, 1507343, 10, 1507344, 10, 1507345, 10, 1507346, 10, 1507347, 10, 1507348, 10, 1507349, 10, 1507350, 10, 1507351, 10, 1507352, 10, 1507353, 10, 1507354, 10, 1507355, 10, 1507356, 10, 1507357, 10, 1507358, 10, 1507359, 10, 1507360, 10, 1507361, 10, 1507362, 10, 1507363, 10, 1507364, 10, 1507365, 10, 1507366, 10, 1507367, 10, 1507368, 10, 1507369, 10, 1507370, 10, 1507371, 10, 1507372, 10, 1507373, 10, 1507374, 10, 1507375, 10, 1507376, 10, 1507377, 10, 1507378, 10, 1507379, 10, 1507380, 10, 1507381, 10, 1507382, 10, 1507383, 10, 1507384, 10, 1507385, 10, 1507386, 10, 1507387, 10, 1507388, 10, 1507389, 10, 1507390, 10, 1507391, 10, 1507392, 10, 1507393, 10, 1507394, 10, 1507395, 10, 1507396, 10, 1507397, 10, 1507398, 10, 1507399, 10, 1572864, 10, 1572865, 10, 1572866, 10, 1572867, 10, 1572868, 10, 1572869, 10, 1572870, 10, 1572871, 10, 1572872, 10, 1572873, 10, 1572874, 10, 1572875, 10, 1572876, 10, 1572877, 10, 1572878, 10, 1572879, 10, 1572880, 10, 1572881, 10, 1572882, 10, 1572883, 10, 1572884, 10, 1572885, 10, 1572886, 10, 1572887, 10, 1572888, 10, 1572889, 10, 1572890, 10, 1572891, 10, 1572892, 10, 1572893, 10, 1572894, 10, 1572895, 10, 1572896, 10, 1572897, 10, 1572898, 10, 1572899, 10, 1572900, 10, 1572901, 10, 1572902, 10, 1572903, 10, 1572904, 10, 1572905, 10, 1572906, 10, 1572907, 10, 1572908, 10, 1572909, 10, 1572910, 10, 1572911, 10, 1572912, 10, 1572913, 10, 1572914, 10, 1572915, 10, 1572916, 10, 1572917, 10, 1572918, 10, 1572919, 10, 1572920, 10, 1572921, 10, 1572922, 10, 1572923, 10, 1572924, 10, 1572925, 10, 1572926, 10, 1572927, 10, 1572928, 10, 1572929, 10, 1572930, 10, 1572931, 10, 1572932, 10, 1572933, 10, 1572934, 10, 1572935, 10, 1638400, 10, 1638401, 10, 1638402, 10, 1638403, 10, 1638404, 10, 1638405, 10, 1638406, 10, 1638407, 10, 1638408, 10, 1638409, 10, 1638410, 10, 1638411, 10, 1638412, 10, 1638413, 10, 1638414, 10, 1638415, 10, 1638416, 10, 1638417, 10, 1638418, 10, 1638419, 10, 1638420, 10, 1638421, 10, 1638422, 10, 1638423, 10, 1638424, 10, 1638425, 10, 1638426, 10, 1638427, 10, 1638428, 10, 1638429, 10, 1638430, 10, 1638431, 10, 1638432, 10, 1638433, 10, 1638434, 10, 1638435, 10, 1638436, 10, 1638437, 10, 1638438, 10, 1638439, 10, 1638440, 10, 1638441, 10, 1638442, 10, 1638443, 10, 1638444, 10, 1638445, 10, 1638446, 10, 1638447, 10, 1638448, 10, 1638449, 10, 1638450, 10, 1638451, 10, 1638452, 10, 1638453, 10, 1638454, 10, 1638455, 10, 1638456, 10, 1638457, 10, 1638458, 10, 1638459, 10, 1638460, 10, 1638461, 10, 1638462, 10, 1638463, 10, 1638464, 10, 1638465, 10, 1638466, 10, 1638467, 10, 1638468, 10, 1638469, 10, 1638470, 10, 1638471, 10, 1703952, 10, 1703953, 10, 1703954, 10, 1703955, 10, 1703956, 10, 1703957, 10, 1703958, 10, 1703959, 10, 1703960, 10, 1703961, 10, 1703962, 10, 1703963, 10, 1703964, 10, 1703965, 10, 1703966, 10, 1703967, 10, 1703968, 10, 1703969, 10, 1703970, 10, 1703971, 10, 1703972, 10, 1703973, 10, 1703974, 10, 1703975, 10, 1703976, 10, 1703977, 10, 1703978, 10, 1703979, 10, 1703980, 10, 1703981, 10, 1703982, 10, 1703983, 10, 1703984, 10, 1703985, 10, 1703986, 10, 1703987, 10, 1703988, 10, 1703989, 10, 1703990, 10, 1703991, 10, 1703992, 10, 1703993, 10, 1703994, 10, 1703995, 10, 1703996, 10, 1703997, 10, 1703998, 10, 1703999, 10, 1704000, 10, 1704001, 10, 1704002, 10, 1704003, 10, 1704004, 10, 1704005, 10, 1704006, 10, 1704007, 10, 1769488, 10, 1769489, 10, 1769490, 10, 1769491, 10, 1769492, 10, 1769493, 10, 1769494, 10, 1769495, 10, 1769496, 10, 1769497, 10, 1769498, 10, 1769499, 10, 1769500, 10, 1769501, 10, 1769502, 10, 1769503, 10, 1769504, 10, 1769505, 10, 1769506, 10, 1769507, 10, 1769508, 10, 1769509, 10, 1769510, 10, 1769511, 10, 1769512, 10, 1769513, 10, 1769514, 10, 1769515, 10, 1769516, 10, 1769517, 10, 1769518, 10, 1769519, 10, 1769520, 10, 1769521, 10, 1769522, 10, 1769523, 10, 1769524, 10, 1769525, 10, 1769526, 10, 1769527, 10, 1769528, 10, 1769529, 10, 1769530, 10, 1769531, 10, 1769532, 10, 1769533, 10, 1769534, 10, 1769535, 10, 1769536, 10, 1769537, 10, 1769538, 10, 1769539, 10, 1769540, 10, 1769541, 10 + + "_edit_lock_" + True + + + "_editor_collapsed" + True + + + 672, 1120 + + "__editor_plugin_states__" + + "Script" + + "current" + 2 + "sources" + + "res://enemy.gd" + "res://player.gd" + "res://coin.gd" + + + "2D" + + "pixel_snap" + False + "zoom" + 3.794776 + "ofs" + -34.3697, -21.6562 + + "3D" + + "fov" + 45 + "zfar" + 500 + "viewports" "distance" @@ -243,10 +396,10 @@ True "show_grid" True - "show_origin" - True "znear" 0.1 + "show_origin" + True "__editor_run_settings__" @@ -259,27 +412,6 @@ "__editor_plugin_screen__" "2D" - True - 1 - False - 0, 0 - 0 - 1, 1 - 64 - 16 - - 0, 2, 70, 536870914, 71, 10, 72, 10, 73, 10, 74, 10, 75, 10, 76, 10, 77, 10, 78, 10, 65536, 2, 65606, 536870914, 65607, 10, 65608, 10, 65609, 10, 65610, 10, 65611, 10, 65612, 10, 65613, 10, 65614, 10, 131072, 2, 131142, 536870914, 131143, 10, 131144, 10, 131145, 10, 131146, 10, 131147, 10, 131148, 10, 131149, 10, 131150, 10, 196608, 2, 196626, 9, 196678, 536870914, 196679, 10, 196680, 10, 196681, 10, 196682, 10, 196683, 10, 196684, 10, 196685, 10, 196686, 10, 262144, 2, 262162, 8, 262214, 536870914, 262215, 10, 262216, 10, 262217, 10, 262218, 10, 262219, 10, 262220, 10, 262221, 10, 262222, 10, 327680, 2, 327697, 536870921, 327698, 7, 327733, 9, 327750, 536870914, 327751, 10, 327752, 10, 327753, 10, 327754, 10, 327755, 10, 327756, 10, 327757, 10, 327758, 10, 393216, 2, 393233, 536870920, 393234, 7, 393257, 9, 393269, 7, 393286, 536870914, 393287, 10, 393288, 10, 393289, 10, 393290, 10, 393291, 10, 393292, 10, 393293, 10, 393294, 10, 458752, 2, 458769, 7, 458770, 8, 458790, 9, 458793, 8, 458805, 8, 458822, 536870914, 458823, 10, 458824, 10, 458825, 10, 458826, 10, 458827, 10, 458828, 10, 458829, 10, 458830, 10, 524288, 4, 524289, 1, 524304, 536870913, 524305, 536870918, 524306, 6, 524307, 5, 524308, 1, 524326, 8, 524329, 7, 524341, 7, 524358, 536870914, 524359, 10, 524360, 10, 524361, 10, 524362, 10, 524363, 10, 524364, 10, 524365, 10, 524366, 10, 589824, 10, 589825, 13, 589840, 536870914, 589841, 10, 589842, 10, 589843, 10, 589844, 2, 589862, 7, 589865, 7, 589876, 536870913, 589877, 6, 589878, 1, 589894, 536870914, 589895, 10, 589896, 10, 589897, 10, 589898, 10, 589899, 10, 589900, 10, 589901, 10, 589902, 10, 655360, 2, 655376, 536870914, 655377, 10, 655378, 10, 655379, 10, 655380, 2, 655398, 7, 655401, 8, 655412, 536870925, 655413, 11, 655414, 13, 655430, 536870914, 655431, 10, 655432, 10, 655433, 10, 655434, 10, 655435, 10, 655436, 10, 655437, 10, 655438, 10, 720896, 2, 720912, 536870914, 720913, 10, 720914, 10, 720915, 10, 720916, 2, 720934, 8, 720937, 7, 720958, 536870913, 720959, 5, 720960, 536870917, 720961, 5, 720962, 5, 720963, 536870917, 720964, 5, 720965, 0, 720966, 536870916, 720967, 10, 720968, 10, 720969, 10, 720970, 10, 720971, 10, 720972, 10, 720973, 10, 720974, 10, 786432, 2, 786437, 9, 786448, 536870914, 786449, 10, 786450, 10, 786451, 10, 786452, 2, 786464, 536870913, 786465, 1, 786470, 7, 786473, 7, 786474, 536870924, 786475, 1, 786494, 536870914, 786495, 10, 786496, 10, 786497, 10, 786498, 10, 786499, 10, 786500, 10, 786501, 10, 786502, 10, 786503, 10, 786504, 10, 786505, 10, 786506, 10, 786507, 10, 786508, 10, 786509, 10, 851968, 2, 851973, 7, 851984, 536870914, 851985, 10, 851986, 10, 851987, 10, 851988, 2, 851996, 536870913, 851997, 1, 852000, 536870914, 852001, 3, 852006, 7, 852009, 536870913, 852011, 2, 852030, 536870914, 852031, 10, 852032, 10, 852033, 10, 852034, 10, 852035, 10, 852036, 10, 852037, 10, 852038, 10, 852039, 10, 852040, 10, 852041, 10, 852042, 10, 852043, 10, 852044, 10, 852045, 10, 917504, 2, 917506, 9, 917509, 7, 917512, 536870921, 917520, 536870925, 917521, 11, 917522, 11, 917523, 11, 917524, 13, 917532, 536870925, 917533, 13, 917536, 536870914, 917537, 4, 917538, 1, 917540, 536870913, 917541, 0, 917542, 1, 917545, 536870914, 917546, 10, 917547, 4, 917548, 1, 917566, 536870914, 917567, 10, 917568, 10, 917569, 10, 917570, 10, 917571, 10, 917572, 10, 917573, 10, 917574, 10, 917575, 10, 917576, 10, 917577, 10, 917578, 10, 917579, 10, 917580, 10, 917581, 10, 983040, 2, 983042, 7, 983045, 7, 983048, 536870920, 983050, 536870913, 983051, 1, 983064, 536870913, 983065, 1, 983072, 536870914, 983073, 10, 983074, 4, 983075, 0, 983076, 536870916, 983077, 10, 983078, 4, 983079, 536870912, 983080, 536870912, 983081, 536870916, 983082, 10, 983083, 10, 983084, 2, 983095, 9, 983102, 536870914, 983103, 10, 983104, 10, 983105, 10, 983106, 10, 983107, 10, 983108, 10, 983109, 10, 983110, 10, 983111, 10, 983112, 10, 983113, 10, 983114, 10, 983115, 10, 983116, 10, 983117, 10, 1048576, 2, 1048578, 8, 1048581, 8, 1048584, 536870919, 1048586, 536870925, 1048587, 13, 1048600, 536870925, 1048601, 13, 1048604, 9, 1048608, 536870925, 1048609, 536870923, 1048610, 536870923, 1048611, 536870923, 1048612, 10, 1048613, 10, 1048614, 10, 1048615, 10, 1048616, 10, 1048617, 10, 1048618, 10, 1048619, 10, 1048620, 4, 1048621, 1, 1048630, 536870921, 1048631, 8, 1048638, 536870914, 1048639, 10, 1048640, 10, 1048641, 10, 1048642, 10, 1048643, 10, 1048644, 10, 1048645, 10, 1048646, 10, 1048647, 10, 1048648, 10, 1048649, 10, 1048650, 10, 1048651, 10, 1048652, 10, 1048653, 10, 1114112, 4, 1114113, 0, 1114114, 6, 1114115, 0, 1114116, 0, 1114117, 6, 1114118, 1, 1114120, 536870920, 1114128, 536870913, 1114129, 5, 1114130, 536870917, 1114131, 5, 1114132, 0, 1114133, 1, 1114140, 7, 1114141, 536870921, 1114148, 536870914, 1114149, 10, 1114150, 10, 1114151, 10, 1114152, 10, 1114153, 10, 1114154, 10, 1114155, 10, 1114156, 10, 1114157, 2, 1114166, 536870920, 1114167, 8, 1114174, 536870914, 1114175, 10, 1114176, 10, 1114177, 10, 1114178, 10, 1114179, 10, 1114180, 10, 1114181, 10, 1114182, 10, 1114183, 10, 1114184, 10, 1114185, 10, 1114186, 10, 1114187, 10, 1114188, 10, 1179648, 10, 1179649, 10, 1179650, 10, 1179651, 10, 1179652, 10, 1179653, 10, 1179654, 2, 1179656, 536870919, 1179663, 536870915, 1179665, 10, 1179666, 10, 1179667, 10, 1179668, 10, 1179669, 4, 1179670, 12, 1179675, 9, 1179676, 8, 1179677, 8, 1179684, 536870914, 1179685, 10, 1179686, 10, 1179687, 10, 1179688, 10, 1179689, 10, 1179690, 10, 1179691, 10, 1179692, 10, 1179693, 4, 1179694, 1, 1179701, 9, 1179702, 536870919, 1179703, 7, 1179710, 536870914, 1179711, 10, 1179712, 10, 1179713, 10, 1179714, 10, 1179715, 10, 1179716, 10, 1179717, 10, 1179718, 10, 1179719, 10, 1179720, 10, 1179721, 10, 1179722, 10, 1245184, 10, 1245185, 10, 1245186, 10, 1245187, 10, 1245188, 10, 1245189, 10, 1245190, 2, 1245192, 536870919, 1245199, 536870913, 1245200, 536870916, 1245201, 10, 1245202, 10, 1245203, 10, 1245204, 10, 1245205, 10, 1245207, 1, 1245211, 7, 1245212, 7, 1245213, 536870920, 1245220, 536870914, 1245221, 10, 1245222, 10, 1245223, 10, 1245224, 10, 1245225, 10, 1245226, 10, 1245227, 10, 1245228, 10, 1245229, 10, 1245230, 2, 1245237, 8, 1245238, 536870919, 1245239, 8, 1245240, 536870921, 1245246, 536870914, 1245247, 10, 1245248, 10, 1245249, 10, 1245250, 10, 1245251, 10, 1245252, 10, 1245253, 10, 1245254, 10, 1245255, 10, 1245256, 10, 1245257, 10, 1245258, 10, 1310720, 10, 1310721, 10, 1310722, 10, 1310723, 10, 1310724, 10, 1310725, 10, 1310726, 2, 1310728, 536870920, 1310730, 536870913, 1310731, 1, 1310734, 536870913, 1310735, 536870916, 1310736, 10, 1310737, 10, 1310738, 10, 1310739, 10, 1310740, 10, 1310741, 10, 1310742, 10, 1310743, 4, 1310744, 1, 1310747, 8, 1310748, 7, 1310749, 536870919, 1310756, 536870914, 1310757, 10, 1310758, 10, 1310759, 10, 1310760, 10, 1310761, 10, 1310762, 10, 1310763, 10, 1310764, 10, 1310765, 10, 1310766, 4, 1310767, 5, 1310768, 12, 1310773, 7, 1310774, 536870919, 1310775, 7, 1310776, 536870919, 1310782, 536870914, 1310783, 10, 1310784, 10, 1310785, 10, 1310786, 10, 1310787, 10, 1310788, 10, 1310789, 10, 1310790, 10, 1310791, 10, 1310792, 10, 1310793, 10, 1376256, 10, 1376257, 10, 1376258, 10, 1376259, 10, 1376260, 10, 1376261, 10, 1376262, 4, 1376263, 0, 1376264, 536870918, 1376265, 0, 1376266, 536870916, 1376267, 4, 1376268, 0, 1376269, 0, 1376270, 536870916, 1376271, 10, 1376272, 10, 1376273, 10, 1376274, 10, 1376275, 10, 1376276, 10, 1376277, 10, 1376278, 10, 1376279, 10, 1376280, 4, 1376281, 12, 1376283, 8, 1376284, 8, 1376285, 536870920, 1376287, 536870924, 1376288, 0, 1376289, 5, 1376290, 536870917, 1376291, 0, 1376292, 536870916, 1376293, 10, 1376294, 10, 1376295, 10, 1376296, 10, 1376297, 10, 1376298, 10, 1376299, 10, 1376300, 10, 1376301, 10, 1376302, 10, 1376303, 10, 1376305, 12, 1376309, 7, 1376310, 536870920, 1376311, 7, 1376312, 536870920, 1376318, 536870914, 1376319, 10, 1376320, 10, 1376321, 10, 1376322, 10, 1376323, 10, 1376324, 10, 1376325, 10, 1376326, 10, 1376327, 10, 1376328, 10, 1441792, 10, 1441793, 10, 1441794, 10, 1441795, 10, 1441796, 10, 1441797, 10, 1441798, 10, 1441799, 10, 1441800, 10, 1441801, 10, 1441802, 10, 1441803, 10, 1441804, 10, 1441805, 10, 1441806, 10, 1441807, 10, 1441808, 10, 1441809, 10, 1441810, 10, 1441811, 10, 1441812, 10, 1441813, 10, 1441814, 10, 1441815, 10, 1441816, 10, 1441818, 0, 1441819, 6, 1441820, 6, 1441821, 536870918, 1441822, 5, 1441824, 10, 1441825, 10, 1441826, 10, 1441827, 10, 1441828, 10, 1441829, 10, 1441830, 10, 1441831, 10, 1441832, 10, 1441833, 10, 1441834, 10, 1441835, 10, 1441836, 10, 1441837, 10, 1441838, 10, 1441839, 10, 1441840, 10, 1441842, 0, 1441843, 0, 1441844, 0, 1441845, 6, 1441846, 536870918, 1441847, 6, 1441848, 536870918, 1441849, 0, 1441850, 5, 1441851, 536870917, 1441852, 5, 1441853, 0, 1441854, 536870916, 1441855, 10, 1441856, 10, 1441857, 10, 1441858, 10, 1441859, 10, 1441860, 10, 1441861, 10, 1441862, 10, 1441863, 10, 1507328, 10, 1507329, 10, 1507330, 10, 1507331, 10, 1507332, 10, 1507333, 10, 1507334, 10, 1507335, 10, 1507336, 10, 1507337, 10, 1507338, 10, 1507339, 10, 1507340, 10, 1507341, 10, 1507342, 10, 1507343, 10, 1507344, 10, 1507345, 10, 1507346, 10, 1507347, 10, 1507348, 10, 1507349, 10, 1507350, 10, 1507351, 10, 1507352, 10, 1507353, 10, 1507354, 10, 1507355, 10, 1507356, 10, 1507357, 10, 1507358, 10, 1507359, 10, 1507360, 10, 1507361, 10, 1507362, 10, 1507363, 10, 1507364, 10, 1507365, 10, 1507366, 10, 1507367, 10, 1507368, 10, 1507369, 10, 1507370, 10, 1507371, 10, 1507372, 10, 1507373, 10, 1507374, 10, 1507375, 10, 1507376, 10, 1507377, 10, 1507378, 10, 1507379, 10, 1507380, 10, 1507381, 10, 1507382, 10, 1507383, 10, 1507384, 10, 1507385, 10, 1507386, 10, 1507387, 10, 1507388, 10, 1507389, 10, 1507390, 10, 1507391, 10, 1507392, 10, 1507393, 10, 1507394, 10, 1507395, 10, 1507396, 10, 1507397, 10, 1507398, 10, 1507399, 10, 1572864, 10, 1572865, 10, 1572866, 10, 1572867, 10, 1572868, 10, 1572869, 10, 1572870, 10, 1572871, 10, 1572872, 10, 1572873, 10, 1572874, 10, 1572875, 10, 1572876, 10, 1572877, 10, 1572878, 10, 1572879, 10, 1572880, 10, 1572881, 10, 1572882, 10, 1572883, 10, 1572884, 10, 1572885, 10, 1572886, 10, 1572887, 10, 1572888, 10, 1572889, 10, 1572890, 10, 1572891, 10, 1572892, 10, 1572893, 10, 1572894, 10, 1572895, 10, 1572896, 10, 1572897, 10, 1572898, 10, 1572899, 10, 1572900, 10, 1572901, 10, 1572902, 10, 1572903, 10, 1572904, 10, 1572905, 10, 1572906, 10, 1572907, 10, 1572908, 10, 1572909, 10, 1572910, 10, 1572911, 10, 1572912, 10, 1572913, 10, 1572914, 10, 1572915, 10, 1572916, 10, 1572917, 10, 1572918, 10, 1572919, 10, 1572920, 10, 1572921, 10, 1572922, 10, 1572923, 10, 1572924, 10, 1572925, 10, 1572926, 10, 1572927, 10, 1572928, 10, 1572929, 10, 1572930, 10, 1572931, 10, 1572932, 10, 1572933, 10, 1572934, 10, 1572935, 10, 1638400, 10, 1638401, 10, 1638402, 10, 1638403, 10, 1638404, 10, 1638405, 10, 1638406, 10, 1638407, 10, 1638408, 10, 1638409, 10, 1638410, 10, 1638411, 10, 1638412, 10, 1638413, 10, 1638414, 10, 1638415, 10, 1638416, 10, 1638417, 10, 1638418, 10, 1638419, 10, 1638420, 10, 1638421, 10, 1638422, 10, 1638423, 10, 1638424, 10, 1638425, 10, 1638426, 10, 1638427, 10, 1638428, 10, 1638429, 10, 1638430, 10, 1638431, 10, 1638432, 10, 1638433, 10, 1638434, 10, 1638435, 10, 1638436, 10, 1638437, 10, 1638438, 10, 1638439, 10, 1638440, 10, 1638441, 10, 1638442, 10, 1638443, 10, 1638444, 10, 1638445, 10, 1638446, 10, 1638447, 10, 1638448, 10, 1638449, 10, 1638450, 10, 1638451, 10, 1638452, 10, 1638453, 10, 1638454, 10, 1638455, 10, 1638456, 10, 1638457, 10, 1638458, 10, 1638459, 10, 1638460, 10, 1638461, 10, 1638462, 10, 1638463, 10, 1638464, 10, 1638465, 10, 1638466, 10, 1638467, 10, 1638468, 10, 1638469, 10, 1638470, 10, 1638471, 10, 1703952, 10, 1703953, 10, 1703954, 10, 1703955, 10, 1703956, 10, 1703957, 10, 1703958, 10, 1703959, 10, 1703960, 10, 1703961, 10, 1703962, 10, 1703963, 10, 1703964, 10, 1703965, 10, 1703966, 10, 1703967, 10, 1703968, 10, 1703969, 10, 1703970, 10, 1703971, 10, 1703972, 10, 1703973, 10, 1703974, 10, 1703975, 10, 1703976, 10, 1703977, 10, 1703978, 10, 1703979, 10, 1703980, 10, 1703981, 10, 1703982, 10, 1703983, 10, 1703984, 10, 1703985, 10, 1703986, 10, 1703987, 10, 1703988, 10, 1703989, 10, 1703990, 10, 1703991, 10, 1703992, 10, 1703993, 10, 1703994, 10, 1703995, 10, 1703996, 10, 1703997, 10, 1703998, 10, 1703999, 10, 1704000, 10, 1704001, 10, 1704002, 10, 1704003, 10, 1704004, 10, 1704005, 10, 1704006, 10, 1704007, 10, 1769488, 10, 1769489, 10, 1769490, 10, 1769491, 10, 1769492, 10, 1769493, 10, 1769494, 10, 1769495, 10, 1769496, 10, 1769497, 10, 1769498, 10, 1769499, 10, 1769500, 10, 1769501, 10, 1769502, 10, 1769503, 10, 1769504, 10, 1769505, 10, 1769506, 10, 1769507, 10, 1769508, 10, 1769509, 10, 1769510, 10, 1769511, 10, 1769512, 10, 1769513, 10, 1769514, 10, 1769515, 10, 1769516, 10, 1769517, 10, 1769518, 10, 1769519, 10, 1769520, 10, 1769521, 10, 1769522, 10, 1769523, 10, 1769524, 10, 1769525, 10, 1769526, 10, 1769527, 10, 1769528, 10, 1769529, 10, 1769530, 10, 1769531, 10, 1769532, 10, 1769533, 10, 1769534, 10, 1769535, 10, 1769536, 10, 1769537, 10, 1769538, 10, 1769539, 10, 1769540, 10, 1769541, 10 - 1 - - "_edit_lock_" - True - - - "_editor_collapsed" - True - - - 672, 1120 704, 1120 736, 1120 1120, 992 @@ -323,8 +455,247 @@ 4172.75, 541.058 251.684, 1045.6 + + "__editor_plugin_states__" + + "Script" + + "current" + 0 + "sources" + + "res://player.gd" + + + "2D" + + "pixel_snap" + False + "zoom" + 2.272073 + "use_snap" + False + "ofs" + -181.946, -86.2812 + "snap" + 10 + + "3D" + + "viewports" + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "listener" + True + "use_environment" + False + "use_orthogonal" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "listener" + False + "use_environment" + False + "use_orthogonal" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "listener" + False + "use_environment" + False + "use_orthogonal" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "listener" + False + "use_environment" + False + "use_orthogonal" + False + "pos" + 0, 0, 0 + + + "zfar" + 500 + "deflight_rot_y" + 0.628319 + "fov" + 45 + "default_light" + True + "viewport_mode" + 1 + "ambient_light_color" + 0.15, 0.15, 0.15, 1 + "show_grid" + True + "znear" + 0.1 + "show_origin" + True + "deflight_rot_x" + 0.942478 + "default_srgb" + False + + + "__editor_run_settings__" + + "custom_args" + "-l $scene" + "run_mode" + 0 + + "__editor_plugin_screen__" + "Script" + 1451.86, 742.969 + + "__editor_plugin_states__" + + "Script" + + "current" + 0 + "sources" + + "res://moving_platform.gd" + "res://enemy.gd" + "res://player.gd" + "res://coin.gd" + + + "2D" + + "pixel_snap" + False + "zoom" + 1.360373 + "ofs" + -210.652, -172.81 + + "3D" + + "fov" + 400 + "zfar" + 500 + "viewports" + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "use_orthogonal" + False + "use_environment" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "use_orthogonal" + False + "use_environment" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "use_orthogonal" + False + "use_environment" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "use_orthogonal" + False + "use_environment" + False + "pos" + 0, 0, 0 + + + "viewport_mode" + 1 + "default_light" + True + "show_grid" + True + "znear" + 0.1 + "show_origin" + True + + + "__editor_run_settings__" + + "custom_args" + "-l $scene" + "run_mode" + 0 + + "__editor_plugin_screen__" + "2D" + 0, 140 5 624.824, 545.544 @@ -334,10 +705,217 @@ 450, 0 2402.79, 849.52 + + "__editor_plugin_states__" + + "2D" + + "pixel_snap" + False + "zoom" + 2.050547 + "ofs" + -116.979, -109.897 + + "3D" + + "fov" + 400 + "zfar" + 500 + "viewports" + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "use_orthogonal" + False + "use_environment" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "use_orthogonal" + False + "use_environment" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "use_orthogonal" + False + "use_environment" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "use_orthogonal" + False + "use_environment" + False + "pos" + 0, 0, 0 + + + "viewport_mode" + 1 + "default_light" + True + "show_grid" + True + "znear" + 0.1 + "show_origin" + True + + + "__editor_run_settings__" + + "custom_args" + "-l $scene" + "run_mode" + 0 + + "__editor_plugin_screen__" + "2D" + 2 834.664, 1309.6 + + "__editor_plugin_states__" + + "Script" + + "current" + 0 + "sources" + + "res://enemy.gd" + + + "2D" + + "pixel_snap" + False + "zoom" + 1.108033 + "ofs" + -227.625, -197.9 + + "3D" + + "fov" + 45 + "zfar" + 500 + "viewports" + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "use_orthogonal" + False + "use_environment" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "use_orthogonal" + False + "use_environment" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "use_orthogonal" + False + "use_environment" + False + "pos" + 0, 0, 0 + + + "distance" + 4 + "x_rot" + 0 + "y_rot" + 0 + "use_orthogonal" + False + "use_environment" + False + "pos" + 0, 0, 0 + + + "viewport_mode" + 1 + "default_light" + True + "show_grid" + True + "znear" + 0.1 + "show_origin" + True + + + "__editor_run_settings__" + + "custom_args" + "-l $scene" + "run_mode" + 0 + + "__editor_plugin_screen__" + "2D" + 707.665, 1225.05 1125.21, 1053.06 1292.11, 1059.24 @@ -349,19 +927,78 @@ 3546.2, 1356.19 2406.63, 815.115 + + "__editor_plugin_states__" + + "Script" + + "current" + 0 + "sources" + + "res://moving_platform.gd" + "res://enemy.gd" + "res://player.gd" + "res://coin.gd" + + + "2D" + + "zoom" + 1 + "ofs" + -5, -25 + + "3D" + + "zfar" + 500 + "fov" + 45 + "window_mode" + 0 + "window_0" + + "distance" + 4 + "x_rot" + 0.337 + "default_light" + True + "y_rot" + -0.575 + "show_grid" + True + "show_origin" + True + "pos" + 0, 0, 0 + + "znear" + 0.1 + + + "__editor_run_settings__" + + "custom_args" + "-l $scene" + "run_mode" + 0 + + "__editor_plugin_screen__" + "2D" + 12 -202 358 -10 - 2 7 14.769231 - "This is a simple demo on how to make a platformer game with Godot.This version uses physics and the 2D physics engine for motion and collision.The demo also shows the benefits of using the scene system, where coins,enemies and the player are edited separatedly and instanced in the stage.To edit the base tiles for the tileset, open the tileset_edit.xml file and follow instructions." - 0 + "This is a simple demo on how to make a platformer game with Godot."This version uses physics and the 2D physics engine for motion and collision.""The demo also shows the benefits of using the scene system, where coins,"enemies and the player are edited separatedly and instanced in the stage.""To edit the base tiles for the tileset, open the tileset_edit.xml file and follow "instructions."" -1 "nodes" - -1, -1, 1, 0, -1, 2, 2, 0, 3, 1, 0, 0, 0, 5, 4, -1, 16, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 9, 15, 10, 16, 11, 17, 3, 18, 6, 19, 12, 3, 13, 0, 0, 0, 1, 20, -1, 2, 2, 0, 3, 14, 0, 2, 0, 22, 21, 15, 1, 10, 16, 0, 2, 0, 22, 23, 15, 1, 10, 17, 0, 2, 0, 22, 24, 15, 1, 10, 18, 0, 2, 0, 22, 25, 15, 1, 10, 19, 0, 2, 0, 22, 26, 15, 1, 10, 20, 0, 2, 0, 22, 27, 15, 1, 10, 21, 0, 2, 0, 22, 28, 15, 1, 10, 22, 0, 2, 0, 22, 29, 15, 1, 10, 23, 0, 2, 0, 22, 30, 15, 1, 10, 24, 0, 2, 0, 22, 31, 15, 1, 10, 25, 0, 2, 0, 22, 32, 15, 1, 10, 26, 0, 2, 0, 22, 33, 15, 1, 10, 27, 0, 2, 0, 22, 34, 15, 1, 10, 28, 0, 2, 0, 22, 35, 15, 1, 10, 29, 0, 2, 0, 22, 36, 15, 1, 10, 30, 0, 2, 0, 22, 37, 15, 1, 10, 31, 0, 2, 0, 22, 38, 15, 1, 10, 32, 0, 2, 0, 22, 39, 15, 1, 10, 33, 0, 2, 0, 22, 40, 15, 1, 10, 34, 0, 2, 0, 22, 41, 15, 1, 10, 35, 0, 2, 0, 22, 42, 15, 1, 10, 36, 0, 2, 0, 22, 43, 15, 1, 10, 37, 0, 2, 0, 22, 44, 15, 1, 10, 38, 0, 2, 0, 22, 45, 15, 1, 10, 39, 0, 2, 0, 22, 46, 15, 1, 10, 40, 0, 2, 0, 22, 47, 15, 1, 10, 41, 0, 2, 0, 22, 48, 15, 1, 10, 42, 0, 2, 0, 22, 49, 15, 1, 10, 43, 0, 2, 0, 22, 50, 15, 1, 10, 44, 0, 2, 0, 22, 51, 15, 1, 10, 45, 0, 2, 0, 22, 52, 15, 1, 10, 46, 0, 2, 0, 22, 53, 15, 1, 10, 47, 0, 2, 0, 22, 54, 15, 1, 10, 48, 0, 2, 0, 22, 55, 15, 1, 10, 49, 0, 2, 0, 22, 56, 15, 1, 10, 50, 0, 2, 0, 22, 57, 15, 1, 10, 51, 0, 2, 0, 22, 58, 15, 1, 10, 52, 0, 2, 0, 22, 59, 15, 1, 10, 53, 0, 2, 0, 22, 60, 15, 1, 10, 54, 0, 2, 0, 22, 61, 15, 1, 10, 55, 0, 2, 0, 22, 62, 15, 1, 10, 56, 0, 2, 0, 22, 63, 15, 1, 10, 57, 0, 0, 0, 65, 64, 58, 1, 10, 59, 0, 0, 0, 1, 66, -1, 1, 2, 0, 0, 46, 0, 68, 67, 60, 3, 10, 61, 69, 62, 70, 63, 0, 46, 0, 68, 71, 60, 3, 10, 64, 69, 65, 70, 66, 0, 46, 0, 68, 72, 60, 3, 10, 67, 69, 68, 70, 66, 0, 46, 0, 68, 73, 69, 1, 10, 70, 0, 0, 0, 75, 74, -1, 7, 2, 0, 76, 71, 77, 4, 78, 2, 79, 72, 80, 2, 81, 4, 0, 0, 0, 1, 82, -1, 1, 2, 0, 0, 52, 0, 65, 83, 73, 1, 10, 74, 0, 52, 0, 65, 84, 73, 1, 10, 75, 0, 52, 0, 65, 85, 73, 1, 10, 76, 0, 52, 0, 65, 86, 73, 1, 10, 77, 0, 52, 0, 65, 87, 73, 1, 10, 78, 0, 52, 0, 65, 88, 73, 1, 10, 79, 0, 52, 0, 65, 89, 73, 1, 10, 80, 0, 52, 0, 65, 90, 73, 1, 10, 81, 0, 52, 0, 65, 91, 73, 1, 10, 82, 0, 52, 0, 65, 92, 73, 1, 10, 83, 0, 52, 0, 65, 93, 73, 1, 10, 84, 0, 0, 0, 95, 94, 85, 0, 0, 0, 0, 96, 96, -1, 30, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 97, 86, 98, 87, 99, 88, 100, 89, 101, 0, 102, 0, 103, 0, 104, 0, 105, 2, 106, 2, 107, 90, 108, 3, 109, 6, 110, 91, 111, 3, 112, 92, 113, 6, 114, 4, 115, 4, 116, 93, 117, 94, 118, 94, 119, 2, 120, 4, 121, 95, 0 + -1, -1, 1, 0, -1, 2, 2, 0, 3, 1, 0, 0, 0, 5, 4, -1, 19, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 9, 15, 10, 16, 11, 17, 12, 18, 13, 19, 3, 20, 6, 21, 14, 22, 15, 3, 16, 0, 0, 0, 1, 23, -1, 2, 2, 0, 3, 17, 0, 2, 0, 25, 24, 18, 3, 2, 0, 10, 19, 3, 20, 0, 2, 0, 25, 26, 18, 3, 2, 0, 10, 21, 3, 20, 0, 2, 0, 25, 27, 18, 3, 2, 0, 10, 22, 3, 20, 0, 2, 0, 25, 28, 18, 3, 2, 0, 10, 23, 3, 20, 0, 2, 0, 25, 29, 18, 3, 2, 0, 10, 24, 3, 20, 0, 2, 0, 25, 30, 18, 3, 2, 0, 10, 25, 3, 20, 0, 2, 0, 25, 31, 18, 3, 2, 0, 10, 26, 3, 20, 0, 2, 0, 25, 32, 18, 3, 2, 0, 10, 27, 3, 20, 0, 2, 0, 25, 33, 18, 3, 2, 0, 10, 28, 3, 20, 0, 2, 0, 25, 34, 18, 3, 2, 0, 10, 29, 3, 20, 0, 2, 0, 25, 35, 18, 3, 2, 0, 10, 30, 3, 20, 0, 2, 0, 25, 36, 18, 3, 2, 0, 10, 31, 3, 20, 0, 2, 0, 25, 37, 18, 3, 2, 0, 10, 32, 3, 20, 0, 2, 0, 25, 38, 18, 3, 2, 0, 10, 33, 3, 20, 0, 2, 0, 25, 39, 18, 3, 2, 0, 10, 34, 3, 20, 0, 2, 0, 25, 40, 18, 3, 2, 0, 10, 35, 3, 20, 0, 2, 0, 25, 41, 18, 3, 2, 0, 10, 36, 3, 20, 0, 2, 0, 25, 42, 18, 3, 2, 0, 10, 37, 3, 20, 0, 2, 0, 25, 43, 18, 3, 2, 0, 10, 38, 3, 20, 0, 2, 0, 25, 44, 18, 3, 2, 0, 10, 39, 3, 20, 0, 2, 0, 25, 45, 18, 3, 2, 0, 10, 40, 3, 20, 0, 2, 0, 25, 46, 18, 3, 2, 0, 10, 41, 3, 20, 0, 2, 0, 25, 47, 18, 3, 2, 0, 10, 42, 3, 20, 0, 2, 0, 25, 48, 18, 3, 2, 0, 10, 43, 3, 20, 0, 2, 0, 25, 49, 18, 3, 2, 0, 10, 44, 3, 20, 0, 2, 0, 25, 50, 18, 3, 2, 0, 10, 45, 3, 20, 0, 2, 0, 25, 51, 18, 3, 2, 0, 10, 46, 3, 20, 0, 2, 0, 25, 52, 18, 3, 2, 0, 10, 47, 3, 20, 0, 2, 0, 25, 53, 18, 3, 2, 0, 10, 48, 3, 20, 0, 2, 0, 25, 54, 18, 3, 2, 0, 10, 49, 3, 20, 0, 2, 0, 25, 55, 18, 3, 2, 0, 10, 50, 3, 20, 0, 2, 0, 25, 56, 18, 3, 2, 0, 10, 51, 3, 20, 0, 2, 0, 25, 57, 18, 3, 2, 0, 10, 52, 3, 20, 0, 2, 0, 25, 58, 18, 3, 2, 0, 10, 53, 3, 20, 0, 2, 0, 25, 59, 18, 3, 2, 0, 10, 54, 3, 20, 0, 2, 0, 25, 60, 18, 3, 2, 0, 10, 55, 3, 20, 0, 2, 0, 25, 61, 18, 3, 2, 0, 10, 56, 3, 20, 0, 2, 0, 25, 62, 18, 3, 2, 0, 10, 57, 3, 20, 0, 2, 0, 25, 63, 18, 3, 2, 0, 10, 58, 3, 20, 0, 2, 0, 25, 64, 18, 3, 2, 0, 10, 59, 3, 20, 0, 2, 0, 25, 65, 18, 3, 2, 0, 10, 60, 3, 20, 0, 2, 0, 25, 66, 18, 3, 2, 0, 10, 61, 3, 20, 0, 0, 0, 68, 67, 62, 3, 2, 0, 10, 63, 3, 64, 0, 0, 0, 1, 69, -1, 1, 2, 0, 0, 46, 0, 71, 70, 65, 5, 2, 0, 10, 66, 3, 67, 72, 68, 73, 69, 0, 46, 0, 71, 74, 65, 5, 2, 0, 10, 70, 3, 67, 72, 71, 73, 72, 0, 46, 0, 71, 75, 65, 5, 2, 0, 10, 73, 3, 67, 72, 74, 73, 72, 0, 46, 0, 71, 76, 75, 3, 2, 0, 10, 76, 3, 77, 0, 0, 0, 78, 77, -1, 7, 2, 0, 79, 78, 80, 4, 81, 2, 82, 79, 83, 2, 84, 4, 0, 0, 0, 1, 85, -1, 1, 2, 0, 0, 52, 0, 68, 86, 80, 3, 2, 0, 10, 81, 3, 82, 0, 52, 0, 68, 87, 80, 3, 2, 0, 10, 83, 3, 82, 0, 52, 0, 68, 88, 80, 3, 2, 0, 10, 84, 3, 82, 0, 52, 0, 68, 89, 80, 3, 2, 0, 10, 85, 3, 82, 0, 52, 0, 68, 90, 80, 3, 2, 0, 10, 86, 3, 82, 0, 52, 0, 68, 91, 80, 3, 2, 0, 10, 87, 3, 82, 0, 52, 0, 68, 92, 80, 3, 2, 0, 10, 88, 3, 82, 0, 52, 0, 68, 93, 80, 3, 2, 0, 10, 89, 3, 82, 0, 52, 0, 68, 94, 80, 3, 2, 0, 10, 90, 3, 82, 0, 52, 0, 68, 95, 80, 3, 2, 0, 10, 91, 3, 82, 0, 52, 0, 68, 96, 80, 3, 2, 0, 10, 92, 3, 82, 0, 0, 0, 98, 97, 93, 2, 2, 0, 3, 94, 0, 0, 0, 99, 99, -1, 30, 2, 0, 6, 2, 7, 3, 8, 3, 9, 4, 100, 95, 101, 96, 102, 97, 103, 98, 104, 0, 105, 0, 106, 0, 107, 0, 108, 2, 109, 2, 110, 13, 111, 3, 112, 6, 113, 99, 114, 3, 115, 100, 116, 6, 117, 4, 118, 4, 119, 101, 120, 8, 121, 8, 122, 2, 123, 4, 124, 102, 0 "conns" diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 37681e1b81d..6f183252124 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -55,16 +55,32 @@ Vector2 PhysicsBody2D::get_one_way_collision_direction() const{ } +void PhysicsBody2D::set_one_way_collision_max_depth(float p_depth) { + + one_way_collision_max_depth=p_depth; + Physics2DServer::get_singleton()->body_set_one_way_collision_max_depth(get_rid(),p_depth); + +} + +float PhysicsBody2D::get_one_way_collision_max_depth() const{ + + return one_way_collision_max_depth; +} + + void PhysicsBody2D::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_layer_mask","mask"),&PhysicsBody2D::set_layer_mask); ObjectTypeDB::bind_method(_MD("get_layer_mask"),&PhysicsBody2D::get_layer_mask); ObjectTypeDB::bind_method(_MD("set_one_way_collision_direction","dir"),&PhysicsBody2D::set_one_way_collision_direction); ObjectTypeDB::bind_method(_MD("get_one_way_collision_direction"),&PhysicsBody2D::get_one_way_collision_direction); + ObjectTypeDB::bind_method(_MD("set_one_way_collision_max_depth","depth"),&PhysicsBody2D::set_one_way_collision_max_depth); + ObjectTypeDB::bind_method(_MD("get_one_way_collision_max_depth"),&PhysicsBody2D::get_one_way_collision_max_depth); ObjectTypeDB::bind_method(_MD("add_collision_exception_with","body:PhysicsBody2D"),&PhysicsBody2D::add_collision_exception_with); ObjectTypeDB::bind_method(_MD("remove_collision_exception_with","body:PhysicsBody2D"),&PhysicsBody2D::remove_collision_exception_with); ADD_PROPERTY(PropertyInfo(Variant::INT,"layers",PROPERTY_HINT_ALL_FLAGS),_SCS("set_layer_mask"),_SCS("get_layer_mask")); - ADD_PROPERTY(PropertyInfo(Variant::VECTOR2,"one_way_collision/direction"),_SCS("set_one_way_collision_direction"),_SCS("get_one_way_collision_direction")); + ADD_PROPERTYNZ(PropertyInfo(Variant::VECTOR2,"one_way_collision/direction"),_SCS("set_one_way_collision_direction"),_SCS("get_one_way_collision_direction")); + ADD_PROPERTYNZ(PropertyInfo(Variant::REAL,"one_way_collision/max_depth"),_SCS("set_one_way_collision_max_depth"),_SCS("get_one_way_collision_max_depth")); } void PhysicsBody2D::set_layer_mask(uint32_t p_mask) { @@ -81,6 +97,7 @@ uint32_t PhysicsBody2D::get_layer_mask() const { PhysicsBody2D::PhysicsBody2D(Physics2DServer::BodyMode p_mode) : CollisionObject2D( Physics2DServer::get_singleton()->body_create(p_mode), false) { mask=1; + set_one_way_collision_max_depth(0); } @@ -947,7 +964,7 @@ Vector2 KinematicBody2D::move(const Vector2& p_motion) { //if (dcast_motion(get_shape(i)->get_rid(), get_global_transform() * get_shape_transform(i), p_motion, 0,lsafe,lunsafe,exclude,get_layer_mask(),mask); //print_line("shape: "+itos(i)+" travel:"+rtos(ltravel)); if (!valid) { + safe=0; unsafe=0; best_shape=i; //sadly it's the best @@ -1009,9 +1027,11 @@ Vector2 KinematicBody2D::move(const Vector2& p_motion) { bool c2 = dss->rest_info(get_shape(best_shape)->get_rid(), ugt*get_shape_transform(best_shape), Vector2(), margin,&rest_info,exclude,get_layer_mask(),mask); if (!c2) { //should not happen, but floating point precision is so weird.. + colliding=false; } else { + //print_line("Travel: "+rtos(travel)); colliding=true; collision=rest_info.point; diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index f88b89f34f4..eed43c95be4 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -40,6 +40,7 @@ class PhysicsBody2D : public CollisionObject2D { uint32_t mask; Vector2 one_way_collision_direction; + float one_way_collision_max_depth; protected: void _notification(int p_what); @@ -57,6 +58,9 @@ public: void set_one_way_collision_direction(const Vector2& p_dir); Vector2 get_one_way_collision_direction() const; + void set_one_way_collision_max_depth(float p_dir); + float get_one_way_collision_max_depth() const; + PhysicsBody2D(); }; diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp index d93d4d5c350..1cfe9a6ab9b 100644 --- a/servers/physics_2d/body_2d_sw.cpp +++ b/servers/physics_2d/body_2d_sw.cpp @@ -647,6 +647,7 @@ Body2DSW::Body2DSW() : CollisionObject2DSW(TYPE_BODY), active_list(this), inerti area_linear_damp=0; contact_count=0; gravity_scale=1.0; + one_way_collision_max_depth=0.1; still_time=0; continuous_cd_mode=Physics2DServer::CCD_MODE_DISABLED; diff --git a/servers/physics_2d/body_2d_sw.h b/servers/physics_2d/body_2d_sw.h index 8a1415da62b..3b87be27372 100644 --- a/servers/physics_2d/body_2d_sw.h +++ b/servers/physics_2d/body_2d_sw.h @@ -68,6 +68,7 @@ class Body2DSW : public CollisionObject2DSW { real_t applied_torque; Vector2 one_way_collision_direction; + float one_way_collision_max_depth; SelfList active_list; @@ -221,6 +222,9 @@ public: void set_one_way_collision_direction(const Vector2& p_dir) { one_way_collision_direction=p_dir; } Vector2 get_one_way_collision_direction() const { return one_way_collision_direction; } + void set_one_way_collision_max_depth(float p_depth) { one_way_collision_max_depth=p_depth; } + float get_one_way_collision_max_depth() const { return one_way_collision_max_depth; } + void set_space(Space2DSW *p_space); void update_inertias(); diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index f310ee0d9f6..be499550557 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -138,6 +138,21 @@ void Physics2DServerSW::_shape_col_cbk(const Vector2& p_point_A,const Vector2& p if (cbk->max==0) return; + if (cbk->valid_dir!=Vector2()) { + if (p_point_A.distance_squared_to(p_point_B)>cbk->valid_depth*cbk->valid_depth) { + return; + } + if (cbk->valid_dir.dot((p_point_A-p_point_B).normalized())<0.7071) { +/* print_line("A: "+p_point_A); + print_line("B: "+p_point_B); + print_line("discard too angled "+rtos(cbk->valid_dir.dot((p_point_A-p_point_B)))); + print_line("resnorm: "+(p_point_A-p_point_B).normalized()); + print_line("distance: "+rtos(p_point_A.distance_to(p_point_B))); +*/ + return; + } + } + if (cbk->amount == cbk->max) { //find least deep float min_depth=1e20; @@ -875,6 +890,21 @@ Vector2 Physics2DServerSW::body_get_one_way_collision_direction(RID p_body) cons } +void Physics2DServerSW::body_set_one_way_collision_max_depth(RID p_body,float p_max_depth) { + + Body2DSW *body = body_owner.get(p_body); + ERR_FAIL_COND(!body); + body->set_one_way_collision_max_depth(p_max_depth); + +} + +float Physics2DServerSW::body_get_one_way_collision_max_depth(RID p_body) const { + + Body2DSW *body = body_owner.get(p_body); + ERR_FAIL_COND_V(!body,0); + return body->get_one_way_collision_max_depth(); + +} void Physics2DServerSW::body_set_force_integration_callback(RID p_body,Object *p_receiver,const StringName& p_method,const Variant& p_udata) { diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h index b56c6da19aa..e9c499aaffe 100644 --- a/servers/physics_2d/physics_2d_server_sw.h +++ b/servers/physics_2d/physics_2d_server_sw.h @@ -71,6 +71,8 @@ public: struct CollCbkData { + Vector2 valid_dir; + float valid_depth; int max; int amount; Vector2 *ptr; @@ -208,6 +210,10 @@ public: virtual void body_set_one_way_collision_direction(RID p_body,const Vector2& p_direction); virtual Vector2 body_get_one_way_collision_direction(RID p_body) const; + virtual void body_set_one_way_collision_max_depth(RID p_body,float p_max_depth); + virtual float body_get_one_way_collision_max_depth(RID p_body) const; + + virtual void body_set_force_integration_callback(RID p_body,Object *p_receiver,const StringName& p_method,const Variant& p_udata=Variant()); virtual bool body_collide_shape(RID p_body, int p_body_shape,RID p_shape, const Matrix32& p_shape_xform,const Vector2& p_motion,Vector2 *r_results,int p_result_max,int &r_result_count); diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index 76069de9a09..f2ed74ffbf8 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -98,7 +98,7 @@ bool Physics2DDirectSpaceStateSW::intersect_ray(const Vector2& p_from, const Vec if (shape->intersect_segment(local_from,local_to,shape_point,shape_normal)) { - //print_line("inters sgment!"); + Matrix32 xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx); shape_point=xform.xform(shape_point); @@ -217,6 +217,16 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Matrix32 int shape_idx=space->intersection_query_subindex_results[i]; + /*if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) { + + const Body2DSW *body=static_cast(col_obj); + if (body->get_one_way_collision_direction()!=Vector2() && p_motion.dot(body->get_one_way_collision_direction())<=CMP_EPSILON) { + print_line("failed in motion dir"); + continue; + } + }*/ + + Matrix32 col_obj_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx); //test initial overlap, does it collide if going all the way? if (!CollisionSolver2DSW::solve(shape,p_xform,p_motion,col_obj->get_shape(shape_idx),col_obj_xform,Vector2() ,NULL,NULL,NULL,p_margin)) { @@ -227,6 +237,14 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Matrix32 //test initial overlap if (CollisionSolver2DSW::solve(shape,p_xform,Vector2(),col_obj->get_shape(shape_idx),col_obj_xform,Vector2() ,NULL,NULL,NULL,p_margin)) { + if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) { + //if one way collision direction ignore initial overlap + const Body2DSW *body=static_cast(col_obj); + if (body->get_one_way_collision_direction()!=Vector2()) { + continue; + } + } + return false; } @@ -253,6 +271,29 @@ bool Physics2DDirectSpaceStateSW::cast_motion(const RID& p_shape, const Matrix32 } } + if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) { + + const Body2DSW *body=static_cast(col_obj); + if (body->get_one_way_collision_direction()!=Vector2()) { + + Vector2 cd[2]; + Physics2DServerSW::CollCbkData cbk; + cbk.max=1; + cbk.amount=0; + cbk.ptr=cd; + cbk.valid_dir=body->get_one_way_collision_direction(); + cbk.valid_depth=body->get_one_way_collision_max_depth(); + + Vector2 sep=mnormal; //important optimization for this to work fast enough + bool collided = CollisionSolver2DSW::solve(shape,p_xform,p_motion*(hi+space->contact_max_allowed_penetration),col_obj->get_shape(shape_idx),col_obj_xform,Vector2(),Physics2DServerSW::_shape_col_cbk,&cbk,&sep,p_margin); + if (!collided || cbk.amount==0) { + continue; + } + + } + } + + if (lowget_self() )) continue; + if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) { + const Body2DSW *body=static_cast(col_obj); + cbk.valid_dir=body->get_one_way_collision_direction(); + cbk.valid_depth=body->get_one_way_collision_max_depth(); + } else { + cbk.valid_dir=Vector2(); + cbk.valid_depth=0; + } if (CollisionSolver2DSW::solve(shape,p_shape_xform,p_motion,col_obj->get_shape(shape_idx),col_obj->get_transform() * col_obj->get_shape_transform(shape_idx),Vector2(),cbkres,cbkptr,NULL,p_margin)) { - collided=true; + collided=p_result_max==0 || cbk.amount>0; } } + r_result_count=cbk.amount; return collided; @@ -334,6 +384,8 @@ struct _RestCallbackData2D { Vector2 best_contact; Vector2 best_normal; float best_len; + Vector2 valid_dir; + float valid_depth; }; static void _rest_cbk_result(const Vector2& p_point_A,const Vector2& p_point_B,void *p_userdata) { @@ -341,11 +393,23 @@ static void _rest_cbk_result(const Vector2& p_point_A,const Vector2& p_point_B,v _RestCallbackData2D *rd=(_RestCallbackData2D*)p_userdata; + if (rd->valid_dir!=Vector2()) { + + if (rd->valid_dir!=Vector2()) { + if (p_point_A.distance_squared_to(p_point_B)>rd->valid_depth*rd->valid_depth) + return; + if (rd->valid_dir.dot((p_point_A-p_point_B).normalized())best_len) return; + rd->best_len=len; rd->best_contact=p_point_B; rd->best_normal=contact_rel/len; @@ -385,6 +449,17 @@ bool Physics2DDirectSpaceStateSW::rest_info(RID p_shape, const Matrix32& p_shape if (p_exclude.has( col_obj->get_self() )) continue; + if (col_obj->get_type()==CollisionObject2DSW::TYPE_BODY) { + + const Body2DSW *body=static_cast(col_obj); + rcd.valid_dir=body->get_one_way_collision_direction(); + rcd.valid_depth=body->get_one_way_collision_max_depth(); + } else { + rcd.valid_dir=Vector2(); + rcd.valid_depth=0; + } + + rcd.object=col_obj; rcd.shape=shape_idx; bool sc = CollisionSolver2DSW::solve(shape,p_shape_xform,p_motion,col_obj->get_shape(shape_idx),col_obj->get_transform() * col_obj->get_shape_transform(shape_idx),Vector2() ,_rest_cbk_result,&rcd,NULL,p_margin); diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp index 6e6fae56b1f..07389bc912c 100644 --- a/servers/physics_2d_server.cpp +++ b/servers/physics_2d_server.cpp @@ -503,6 +503,9 @@ void Physics2DServer::_bind_methods() { ObjectTypeDB::bind_method(_MD("body_set_one_way_collision_direction","normal"),&Physics2DServer::body_set_one_way_collision_direction); ObjectTypeDB::bind_method(_MD("body_get_one_way_collision_direction"),&Physics2DServer::body_get_one_way_collision_direction); + ObjectTypeDB::bind_method(_MD("body_set_one_way_collision_max_depth","normal"),&Physics2DServer::body_set_one_way_collision_max_depth); + ObjectTypeDB::bind_method(_MD("body_get_one_way_collision_max_depth"),&Physics2DServer::body_get_one_way_collision_max_depth); + ObjectTypeDB::bind_method(_MD("body_set_omit_force_integration","body","enable"),&Physics2DServer::body_set_omit_force_integration); ObjectTypeDB::bind_method(_MD("body_is_omitting_force_integration","body"),&Physics2DServer::body_is_omitting_force_integration); diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h index 008b25e7d7f..765cebf45fd 100644 --- a/servers/physics_2d_server.h +++ b/servers/physics_2d_server.h @@ -445,6 +445,9 @@ public: virtual void body_set_one_way_collision_direction(RID p_body,const Vector2& p_direction)=0; virtual Vector2 body_get_one_way_collision_direction(RID p_body) const=0; + virtual void body_set_one_way_collision_max_depth(RID p_body,float p_max_depth)=0; + virtual float body_get_one_way_collision_max_depth(RID p_body) const=0; + //missing remove virtual void body_set_contacts_reported_depth_treshold(RID p_body, float p_treshold)=0; virtual float body_get_contacts_reported_depth_treshold(RID p_body) const=0; diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 3fd8d7355be..6c4e15827a7 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -392,7 +392,7 @@ class VisualServerRaster : public VisualServer { CanvasItem() { E=NULL; - z=CANVAS_ITEM_Z_MAX/2; + z=0; opacity=1; self_opacity=1; sort_y=false;