-Andreas

Setting FOV of gameplay camera issues

Recommended Posts

Heyo,

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.. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.