Sign in to follow this  
moadi

Resetting to default camera

Recommended Posts

Posted (edited)

Hey everyone

I've been trying to convert a gamemode I've coded a long while ago from GTA:N to RAGE:MP everything is going smooth so far until I got to the camera part

So basically I've just created a camera 

let newCam = mp.cameras.new('default', new mp.Vector3(0, 0, 0), new mp.Vector3(0, 0, 0), 40);
newCam.pointAtCoord(10, 0, 0);
newCam.setActive(true);
mp.game.cam.renderScriptCams(true, false, 0, true, false);

 

And set it to active, it worked fine, but after I'm done I want to reset the camera which means I want to deactivate  this new camera and activate the old gameplay one which focuses on the player and gives you free mouse movement

The way I used to do it on GTA:N was simply like this:

API.setActiveCamera(null);

 

I've looked everywhere I can't seem to find a solution to this, do I have to manually set the camera behind the player? If so how do I give the player free mouse movement?

Thanks

Edited by moadi

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.