From 7bd52b4507f34721b9c7267dc1f7b842b99888e5 Mon Sep 17 00:00:00 2001 From: Spencer Killen Date: Wed, 28 Dec 2022 10:37:27 -0700 Subject: [PATCH] Add ground gravity --- blends/levels/creek_platform.blend | 4 ++-- ...m.glb-1859edb1b8317bf2ecdd06bde0c60721.md5 | 4 ++-- ...m.glb-1859edb1b8317bf2ecdd06bde0c60721.scn | Bin 9676 -> 11552 bytes godot/assets/meat_creek/creek_platform.glb | 4 ++-- godot/assets/meat_creek/side_tunnel_1.tscn | 3 ++- godot/player/OnFootPhysics.gd | 3 +++ godot/player/Overlay.gd | 1 - 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/blends/levels/creek_platform.blend b/blends/levels/creek_platform.blend index cc49992..dcf38d2 100644 --- a/blends/levels/creek_platform.blend +++ b/blends/levels/creek_platform.blend @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:537cfda7d86992a647a0e68dec9a4a13adf6b4e44ef096a21893fbcddf1ca739 -size 955672 +oid sha256:ca44bd9c4ee433d62b87a0f990c8c39d42ccbba68ee704d1a7e45a82de921174 +size 940308 diff --git a/godot/.import/creek_platform.glb-1859edb1b8317bf2ecdd06bde0c60721.md5 b/godot/.import/creek_platform.glb-1859edb1b8317bf2ecdd06bde0c60721.md5 index b4afc95..23d4c9b 100644 --- a/godot/.import/creek_platform.glb-1859edb1b8317bf2ecdd06bde0c60721.md5 +++ b/godot/.import/creek_platform.glb-1859edb1b8317bf2ecdd06bde0c60721.md5 @@ -1,3 +1,3 @@ -source_md5="dc558dbf7581e287a28daca6be3a1cca" -dest_md5="c542e847721acd50c307244492ab8175" +source_md5="972d81b0bd575b1c674dc10df9a572c3" +dest_md5="9b133d04e1308f2e5962308f1d907e03" diff --git a/godot/.import/creek_platform.glb-1859edb1b8317bf2ecdd06bde0c60721.scn b/godot/.import/creek_platform.glb-1859edb1b8317bf2ecdd06bde0c60721.scn index 904a632b96b9769dc0b3783916435c073276b056..3233c443432c997c2a79531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@b+(hcf z;T!lNQa=p;h;=gaBl2h5K<0JuJ-k(%;(|}=1Xt*Mle)q)kgT4T-$@&V@5RmXinPG} zxRKON@BrRS>WAPV`~azS_ztd@zi{$;If0wSAw{qSU*xF~_$6+Wy==dY?0dPT`$ca? zuM#{)>PFayH<5ZXd>h|S>IdLaTu179xEF7ee6hn;e1Rt}9Da_^@zlh?Pw_BM#~64P zpWz`G2T$WuG=uW{fzRPx@`H%lB|C8!QJCstOjNgosc_hZpO1B^)$CFkn*#bu>SxmaO4C4 diff --git a/godot/assets/meat_creek/creek_platform.glb b/godot/assets/meat_creek/creek_platform.glb index a6693f3..434a858 100644 --- a/godot/assets/meat_creek/creek_platform.glb +++ b/godot/assets/meat_creek/creek_platform.glb @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df4162a9e6d0cb18dfbcb07d358573d4843422d28991f7327295f552d4114bee -size 1208996 +oid sha256:3c5d1b921c2bc4c37deffb7acef269761d65c33a46f54197483d3ae5f0850e8f +size 1211656 diff --git a/godot/assets/meat_creek/side_tunnel_1.tscn b/godot/assets/meat_creek/side_tunnel_1.tscn index 74ea41a..2b84c31 100644 --- a/godot/assets/meat_creek/side_tunnel_1.tscn +++ b/godot/assets/meat_creek/side_tunnel_1.tscn @@ -61,7 +61,7 @@ transform = Transform( 0.0716538, 0, 0.99743, 0, 1, 0, -0.99743, 0, 0.0716538, - environment = SubResource( 3 ) [node name="SinkBlock" parent="." index="4" instance=ExtResource( 5 )] -transform = Transform( 80, 0, 0, 0, 6.74679, 0, 0, 0, 80, 0, -5.81972, -43.3626 ) +transform = Transform( 80, 0, 0, 0, 3.87358, 0, 0, 0, 80, 0, -3.3489, -43.3626 ) [node name="platforms" type="Spatial" parent="." index="5"] @@ -139,6 +139,7 @@ max_db = 6.0 max_distance = 200.0 [node name="upper_shelf" parent="." index="10" instance=ExtResource( 13 )] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.09789, 0 ) [node name="AmbientSounds" type="Node" parent="." index="11"] diff --git a/godot/player/OnFootPhysics.gd b/godot/player/OnFootPhysics.gd index acf5c0b..73cbffd 100644 --- a/godot/player/OnFootPhysics.gd +++ b/godot/player/OnFootPhysics.gd @@ -5,6 +5,7 @@ onready var util = get_node("/root/Util") export var gravity: float = 6.0 # When falling, gravity is artificially increased export var gravity_downwards_factor: float = 3 +export var ground_gravity: float = 3.1 # Rate of gaining speed export var velocity_acceleration_xz: float = 3 export var velocity_acceleration_y: float = 5 @@ -51,6 +52,8 @@ func process_velocity(delta: float): else: velocity.y = max(0.0, velocity.y) target_velocity.y = max(0.0, max(target_velocity.y, jump_power * $"../MovementInput".jump_intent * jump_permission)) + if target_velocity.y == 0.0 and velocity.y == 0.0: + velocity.y = -ground_gravity if not is_jumping and $"../MovementInput".jump_intent != 0.0 and is_on_floor(): jump_permission = 0.0 is_jumping = true diff --git a/godot/player/Overlay.gd b/godot/player/Overlay.gd index b130b17..ab8cf15 100644 --- a/godot/player/Overlay.gd +++ b/godot/player/Overlay.gd @@ -13,7 +13,6 @@ func _ready(): _ignore = GlobalEventBus.connect("player_exited_meat_sink", self, "exit_water") func enter_water(): - print(2) in_water += 1 func exit_water():