Jump to content

Setting FOV of gameplay camera issues


Recommended Posts


So I've been attempting to set the FOV(Field of View) of the gameplay camera belonging to the client. So far I haven't succeeded in this.. I've tried just about everything but I just can't manage to set any settings of the camera. I can get the camera and getCoords, getRot and so on perfectly fine. But the second I attempt to set anything on it, it's just not working. Unless I make the newly created camera the active one and start rendering it. Then setting the FOV works, but at the cost of the controls. It's just static, and I'd have to code my own controller for it that takes in input from the mouse etc. I was hoping to just get the gameplay camera, set the FOV and be done with it that way.

Is this possible?


Some of the things I've tried (I forgot some most likely):

- let cam = mp.cameras.new('default'); & let cam = mp.cameras.new('gameplay');

- Call the setFov(float) right after getting the cameras, inside render and using a setInterval

- Get the cameras from the start, inside events and inside the render event

- Created new cameras of the type 'default' & 'gameplay', setActive and rendered but lost controls that way

- Used the natives to get currently rendering camera and gameplay camera

- Used natives to set the FOV of both the camera gotten using the Rage API and the natives

and more.. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...