mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
Merge pull request #986 from MihailRis/fix-camera-shaking
fix camera exponentially shaking
This commit is contained in:
commit
8a9fdc8c73
1 changed files with 2 additions and 0 deletions
|
|
@ -104,6 +104,8 @@ void CameraControl::updateMouse(PlayerInput& input, int windowHeight) {
|
||||||
glm::vec3 CameraControl::updateCameraShaking(
|
glm::vec3 CameraControl::updateCameraShaking(
|
||||||
const Hitbox& hitbox, float delta
|
const Hitbox& hitbox, float delta
|
||||||
) {
|
) {
|
||||||
|
delta = glm::min(delta, 0.1f);
|
||||||
|
|
||||||
glm::vec3 offset {};
|
glm::vec3 offset {};
|
||||||
const float k = CAM_SHAKE_DELTA_K;
|
const float k = CAM_SHAKE_DELTA_K;
|
||||||
const float ov = CAM_SHAKE_OFFSET_Y;
|
const float ov = CAM_SHAKE_OFFSET_Y;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue