Skip to content

Commit

Permalink
Fixed issue with bob scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexDavies8 committed Sep 26, 2024
1 parent cc2dec6 commit 862c982
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/camera.zig
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub const ViewBobbing = struct { // MARK: ViewBobber
const xBob = @sin(time);
const a = 0.5 * -@sin(2 * time);
const zBob = ((a - a * a * a / 3) * 2 + 0.25 - 0.25 * @cos(2 * time)) * 0.8;
var bobVec = vec.rotateZ(Vec3d{xBob * magnitude * 1.05, 0, zBob * magnitude * 1.05}, -rotation[2]);
var bobVec = vec.rotateZ(Vec3d{xBob * magnitude * 0.05, 0, zBob * magnitude * 0.05}, -rotation[2]);
const eyeMin = game.Player.eyePos - game.Player.desiredEyePos + game.Player.eyeBox.min;
const eyeMax = game.Player.eyePos - game.Player.desiredEyePos + game.Player.eyeBox.max;
const eyeBoxSize = game.Player.eyeBox.max - game.Player.eyeBox.min;
Expand Down

0 comments on commit 862c982

Please sign in to comment.