Skip to content

Commit

Permalink
Fix vertical view bobbing
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueStaggo committed Dec 28, 2024
1 parent 5f860bd commit fe8510e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion VoxelThing.Client/src/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ protected override void OnUpdateFrame(FrameEventArgs args)
camera.Position.Y += Player.EyeLevel;
float yaw = (float)Player.Yaw;
float pitch = (float)Player.Pitch;
camera.Rotation = (yaw, pitch);

// Selection raycast
if (World is not null)
Expand Down Expand Up @@ -277,6 +276,8 @@ protected override void OnUpdateFrame(FrameEventArgs args)
camera.Position.Y += Math.Abs(renderWalk) * 0.1;
camera.Position += (Vector3d)camera.Right * renderWalk * 0.025;
}

camera.Rotation = (yaw, pitch);
}

Profiler.Pop();
Expand Down

0 comments on commit fe8510e

Please sign in to comment.