Skip to content

Commit

Permalink
Set sane default FoV
Browse files Browse the repository at this point in the history
  • Loading branch information
AsgardXIV committed Dec 20, 2022
1 parent 7c9015b commit c31d4e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dalamud/XAT.Plugin/Cutscene/VirtualCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace XAT.Plugin.Cutscene;

public class VirtualCamera
{
public record class CameraState(Vector3 Position, Quaternion Rotation, float? FoV);
public record class CameraState(Vector3 Position, Quaternion Rotation, float FoV);

public bool IsActive { get; set; } = false;

public CameraState State { get; set; } = new CameraState(Vector3.Zero, Quaternion.Identity, null);
public CameraState State { get; set; } = new CameraState(Vector3.Zero, Quaternion.Identity, 0.78f);
}
2 changes: 1 addition & 1 deletion Dalamud/XAT.Plugin/Game/Hooks/CameraHooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public CameraHooks(XATPlugin plugin)
private unsafe Matrix4x4* ProjectionDetour(IntPtr ptr, float fov, float aspect, float nearPlane, float farPlane, float a6, float a7)
{
if (VirtualCamera.IsActive)
fov = VirtualCamera.State.FoV ?? fov;
fov = VirtualCamera.State.FoV;

var exec = ProjectionHook.Original(ptr, fov, aspect, nearPlane, farPlane, a6, a7);

Expand Down

0 comments on commit c31d4e6

Please sign in to comment.