diff --git a/src/Actors/Blobby/Blobby.gd b/src/Actors/Blobby/Blobby.gd index 3c0e42f..a5b0425 100644 --- a/src/Actors/Blobby/Blobby.gd +++ b/src/Actors/Blobby/Blobby.gd @@ -331,7 +331,8 @@ func execute_airstrafe( delta ) if linear_velocity.y > 0: - linear_velocity.y = 0 + # TODO Put constant elsewhere + linear_velocity.y = linear_velocity.y * 0.33 air_strafe_charges -= 1 return linear_velocity @@ -348,8 +349,9 @@ func die() -> void: # This problem stems from trying to decelerate a walk # that was caused by the moving environment and not by input # It is particularly usefull for moving floor physics +# TODO Setting y velocity this way stopped is_on_floor() from working correctly func _on_Blobby_got_grounded() -> void: - velocity -= get_floor_velocity() + velocity.x -= get_floor_velocity().x var floor_object = get_last_slide_collision().collider.get_parent() if "slide_friction" in floor_object: floor_friction = floor_object.slide_friction diff --git a/src/Actors/Blobby/BlobbyStateMachine.gd b/src/Actors/Blobby/BlobbyStateMachine.gd index 4cca69f..b6fef01 100644 --- a/src/Actors/Blobby/BlobbyStateMachine.gd +++ b/src/Actors/Blobby/BlobbyStateMachine.gd @@ -162,6 +162,7 @@ func _get_transition(_delta): elif parent.velocity.x != 0: if Input.is_action_pressed("boost_move"): new_state = states.run + # TODO Walking when stopping and not pressing anything? else: new_state = states.walk if Input.is_action_pressed("duck"): @@ -180,6 +181,7 @@ func _get_transition(_delta): func _enter_state(new_state, old_state): + print(new_state) if old_state == "idle" && (new_state == "walk" || new_state == "run"): init_boost = true init_boost_type = old_state + "_" + new_state @@ -210,7 +212,9 @@ func _enter_state(new_state, old_state): states.run: anim_state_playback.travel("running") states.wallslide: - anim_state_playback.travel("wallsliding") + # TODO When the hitbox transforms from wallslide to idle, blobby hangs in the air and that triggers the wallslide on landing + if(old_state != states.idle): + anim_state_playback.travel("wallsliding")