Jump to content

[HELP] How do I create a camera similar to the default camera?


rubend10s

Recommended Posts

I have a problem with the camera using setVehicleGravity and it has strange behaviors when the vehicle is rotated 90 or -90 degrees on the y axis and points to certain directions

as in the video https://streamable.com/pfrbt


The only solution I could think of is putting gravity with setElementVelocity so I avoid the camera, but the problem is that I have to make my own camera if I want to achieve an effect similar to setVehicleGravity and I don't know the mechanics that the default camera uses

I found some interesting topics like these

 

but still I can't imitate the effect of the default camera

The most difficult thing is to imitate the effect of the camera when the vehicle turns, which is like a smooth interpolation, but I can't decipher the mechanics.

I made several attempts using interpolation and depending on the velocity vector, but nothing seems to mimic it

I also found someone who made a similar camera in gta vice city but I don't know how to see his code

https://gtaforums.com/topic/896122-classic-axis-visual-camera-improvements/

Edited by rubend10s
  • Confused 1
Link to comment

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