#FoV Modding, Need Help

1 messages · Page 1 of 1 (latest)

warped sequoia
#

Hi all i was told to come to discord for help with code modding

I cannot for the life of me get this to work, I have managed to change every fov in the game except the main game play one, the alternate camera is fantastic at a higher fov.

Here is a snippet of my code for changing the fov of all cameras in the game (shotgun attempt out of frustration)
What am i missing with this?

private void UpdateFoV(float fov) {
Camera[] allCameras = Camera.allCameras;

foreach (Camera cam in allCameras){
    cam.fieldOfView = fov; // Set the FoV for each camera
}

//Camera.main.fieldOfView = fov;

}

warped sequoia
#

😢

snow oxide
#

Maybe the dev of the game, @dark oar, can help you

dark oar
#

I would definitely not iterate cameras like that for performance. The main camera can be referenced using CameraScript.Instance.mainCam, only the main scene. Currently the FOV is changed every frame by the camera script, but I can probably surface some variables in the CameraScript to change it

warped sequoia
#

Thanks that is really helpful

warped sequoia
#

I tried using "using System.Reflection;" to find the variables but I'm locked out, allowing access to some of the variables in the CameraScript singleton would be really helpful.

I really love the game but i cant play it due to limited fov on main camera, it gives me crippling headaches.

dark oar
#

I'm adding CameraScript.Instance.NormalFOV and CameraScript.Instance.TopDownFOV in the next update