Set the Field of View In Game Mode

Hey there guys and gals, I just got started playing with cryengine 5.4 today and I am wondering what the variable that allows you to set the fov for the in game camera (NOT the viewport camera) in cryengine 5.4. I found people saying cl_fov does the trick for older versions of the engine but it doesn't seem to be a registered variable in this version?

Sorry for the noob question, all responses will be appreciated!


Re: Set the Field of View In Game Mode

Ah okay that explains it, thanks man. So the game SDK example has that variable included? How would you go about adding it to a template (I'm using the fps template that came with the launcher), or otherwise setting the that parameter to something other than what it defaults to (presumably 60)?

Thanks again for your assistance!


Re: Set the Field of View In Game Mode

Thanks for the response, quasarwei. Programming is not entirely alien to me, however in the context of a game engine it might as well be. I have been snooping around in the files for the project I am working on and the engine itself. The best I can figure this code you generously provided seems like it belongs in the player.cpp file. Please correct me if I am wrong as I have not gotten it to work as of yet. I am including it just after the area responsible for the creation of the player camera, the other place I have tried is in the Camera default component header file as I can see it is called in the player.cpp file.

Thanks again!


Re: Set the Field of View In Game Mode

Perfect, quasarwei. It does in fact work, like a charm even. Thanks so much for the help on this. It doesn't seem to have any affect on the camera in the 'game mode' within the editor (no biggie), but when I export the game to engine it certainly does.

Hey Kyle

Kyle you can also look at Flow Graph and the Camera:View node that allos you to execute a switch to a camera at runtime and you can declare the custom properties in the flowgraph node itself. ... Nodes-View



Who is online

Users browsing this forum: No registered users and 2 guests