Fixed crouch speed bug
This commit is contained in:
parent
e362d6f9fa
commit
69092e471a
@ -3,6 +3,7 @@
|
||||
- [x] Skybox
|
||||
- [x] ~~Glitch: Fall does not remove linear damping, only after jump~~
|
||||
- [x] ~~Glitch: Negative linear damping on jump allows for bunny hopping~~
|
||||
- [x] Bug: Crouch speed not being applied
|
||||
|
||||
- [x] Feature: Add smooth camera movement to camera on crouch. Right now it's too fast and looks arcade af.
|
||||
- [ ] Feature: Add jump effect to camera
|
||||
|
@ -145,7 +145,7 @@ pub fn move_player(
|
||||
forward,
|
||||
player_velocity.linvel,
|
||||
time.delta_seconds(),
|
||||
sprint_multiplier,
|
||||
sprint_multiplier * crouch_multiplier,
|
||||
);
|
||||
}
|
||||
if player_movement_input.back {
|
||||
@ -156,7 +156,7 @@ pub fn move_player(
|
||||
-forward,
|
||||
player_velocity.linvel,
|
||||
time.delta_seconds(),
|
||||
1.0,
|
||||
crouch_multiplier,
|
||||
);
|
||||
}
|
||||
if player_movement_input.right {
|
||||
@ -168,9 +168,9 @@ pub fn move_player(
|
||||
player_velocity.linvel,
|
||||
time.delta_seconds(),
|
||||
if player_linear_xz_state.is_sprinting() {
|
||||
PLAYER_LATERAL_ACCELERATION_WHILE_SPRINTING_MULTIPLIER
|
||||
PLAYER_LATERAL_ACCELERATION_WHILE_SPRINTING_MULTIPLIER * crouch_multiplier
|
||||
} else {
|
||||
PLAYER_LATERAL_ACCELERATION_MULTIPLIER
|
||||
PLAYER_LATERAL_ACCELERATION_MULTIPLIER * crouch_multiplier
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -183,9 +183,9 @@ pub fn move_player(
|
||||
player_velocity.linvel,
|
||||
time.delta_seconds(),
|
||||
if player_linear_xz_state.is_sprinting() {
|
||||
PLAYER_LATERAL_ACCELERATION_WHILE_SPRINTING_MULTIPLIER
|
||||
PLAYER_LATERAL_ACCELERATION_WHILE_SPRINTING_MULTIPLIER * crouch_multiplier
|
||||
} else {
|
||||
PLAYER_LATERAL_ACCELERATION_MULTIPLIER
|
||||
PLAYER_LATERAL_ACCELERATION_MULTIPLIER * crouch_multiplier
|
||||
},
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user