FOV updating

I’m a little confused the way the default UDK classes handle updating FOV.

The engine calls UpdateViewTarget() on the Camera class each tick, which passes an out param for TViewTarget (which contains a param for FOV) and then passes this to the native function ApplyCameraModifiers().

That’s all fine. However in the PlayerController class, in PlayerTick it calls AdjustFOV(), which constantly is trying to interpolate FOVAngle to DesiredFOV. So essentially cancelling out what’s happening in Camera.

Anyone know why they have it set up like this? And how they expect it to be used?

Huh. I never dug that deep into it before. Many years ago I tried that Customizing Camera Behavior tutorial over at UDK | CameraTechnicalGuide and because it worked, I never dug deeper into how it works.

I just now read through the functions you mention and it does indeed look like two functions trying to do the same thing, at least for a camera that is a PlayerController.PlayerCamera. This is just a guess, but maybe Epic wanted cameras generally to work one way, and then decided to let PlayerControllers control the cameras more directly, but never cleaned up the code.

I never use DesiredFOV. I set FOVAngle myself in my custom PlayerController.GetPlayerViewPoint and I’ve never had any problems. Now that I know my game is uselessly overwriting the same variable every tick, I feel like I have to go clean it up now. Maybe I can just stop calling super.GetPlayerViewPoint().

Tbh I never had problems with fov i use custom camera and it works just fine… Camera class and in there i use setfov().
I hope that my information helps…