Crouching is back, finally
This commit is contained in:
parent
2d12f5b392
commit
44e245cfde
@ -18,11 +18,11 @@ Multiplayer
|
|||||||
|
|
||||||
# TODOs:
|
# TODOs:
|
||||||
- [x] Detach player rotation from character model
|
- [x] Detach player rotation from character model
|
||||||
- [ ] Weapon Sway PENDING!!!
|
- [x] Weapon Sway
|
||||||
- [x] Fixing leaning
|
- [x] Fixing leaning
|
||||||
- [x] Snap back leaning too quick
|
- [x] Snap back leaning too quick
|
||||||
- [x] Issue with moving around quickly
|
- [x] Issue with moving around quickly
|
||||||
- [ ] Bring Crouching back
|
- [x] Bring Crouching back
|
||||||
- [ ] Inspect animation (procedural)
|
- [ ] Inspect animation (procedural)
|
||||||
- [ ] Reload animation (procedural)
|
- [ ] Reload animation (procedural)
|
||||||
- [ ] Real world magazines
|
- [ ] Real world magazines
|
||||||
|
@ -53,15 +53,14 @@ pub fn update_camera_vertical_position(
|
|||||||
(delta / player_values_state.player_crouch_time_s).clamp(0.0, 1.0),
|
(delta / player_values_state.player_crouch_time_s).clamp(0.0, 1.0),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// TODO: Add elapsed time to standup so that crouch time and standup time is the same.
|
camera_transform.translation = camera_transform.translation.lerp(
|
||||||
/*camera_transform.translation = camera_transform.translation.lerp(
|
|
||||||
Vec3 {
|
Vec3 {
|
||||||
x: camera_transform.translation.x,
|
x: camera_transform.translation.x,
|
||||||
y: player_values_state.player_camera_height,
|
y: player_values_state.player_camera_height,
|
||||||
z: camera_transform.translation.z,
|
z: camera_transform.translation.z,
|
||||||
},
|
},
|
||||||
time.delta_seconds().clamp(0.0, 1.0),
|
time.delta_seconds() / player_values_state.player_crouch_time_s,
|
||||||
);*/
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +45,8 @@ impl Default for PlayerValuesState {
|
|||||||
player_initial_weight: 75.0,
|
player_initial_weight: 75.0,
|
||||||
player_gravity_scale: 4.0,
|
player_gravity_scale: 4.0,
|
||||||
player_height: 2.5,
|
player_height: 2.5,
|
||||||
player_camera_height: 1.25,
|
player_camera_height: 1.70858,
|
||||||
player_crouch_height: 0.0,
|
player_crouch_height: 1.0,
|
||||||
player_crouch_time_s: 1.25,
|
player_crouch_time_s: 1.25,
|
||||||
player_linear_damping: 3.5,
|
player_linear_damping: 3.5,
|
||||||
player_linear_damping_while_jumping: 0.8,
|
player_linear_damping_while_jumping: 0.8,
|
||||||
|
Loading…
Reference in New Issue
Block a user