diff --git a/modules/going/player_states.cpp b/modules/going/player_states.cpp index 3d51efe4..90815bb3 100644 --- a/modules/going/player_states.cpp +++ b/modules/going/player_states.cpp @@ -194,8 +194,7 @@ void JumpingState::state_entered() { Vector3 const current{this->get_body()->get_velocity()}; Vector2 const impulse{this->get_body()->get_jump_impulse()}; this->get_body()->set_velocity( ( - Vector3{current.x, impulse.y, current.z} - + current.normalized() * impulse.x + Vector3{current.x * impulse.x, impulse.y, current.z * impulse.x} )); this->get_body()->get_anim()->play("jump"); } diff --git a/project/objects/player.tscn b/project/objects/player.tscn index e5433c07..4b506b3b 100644 --- a/project/objects/player.tscn +++ b/project/objects/player.tscn @@ -33,6 +33,7 @@ floor_max_angle = 0.460767 floor_snap_length = 0.35 acceleration = 10.0 target_speed = 25.0 +jump_impulse = Vector2(0.9, 5) [node name="PlayerStateMachine" type="PlayerStateMachine" parent="."]