Camera not in correct position in game

GTA:V Modding with ZModeler3 discussion.
Post Reply
Maxdugen
Posts: 33
Joined: Mon Dec 12, 2022 8:40 am

Camera not in correct position in game

Post by Maxdugen »

Hello, does anybody know how the camera in game is positioned on a vehicle in 3rd person?

I’ve come across a few add on vehicles and in game it looks further away from the camera than normal. And if you press the button to look behind (see front of vehicle) it looks closer to the camera than usual. So it’s almost as if the vehicle is sitting further front than it should.

Does the camera use the chassis pivot point or something like that as a point of reference for its position?

Any help greatly appreciated, thanks!
User avatar
Oleg
Site Admin
Posts: 14100
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Camera not in correct position in game

Post by Oleg »

If i'm not mistaken, chassis axes are taken as the center of the vehicle, so in most of cases it should be 0,0,0 point. The entire model boundary is used to create the bounds sphere of the object and camera is placed with respect to this bounding sphere. The issue is that ZModeler calculates bounding sphere a bit larger than it actually could be, as it takes bounding box first (which is accurate and correct) and evaluates a bounding sphere for this box rather than for the model itself.
Maxdugen
Posts: 33
Joined: Mon Dec 12, 2022 8:40 am

Re: Camera not in correct position in game

Post by Maxdugen »

So the 3rd person camera for a vehicle isn’t determined by any meta file, it’s purely from the sphere calculated around the bounding box? How would I correct this so the camera moves closer to the vehicle? Does it have anything to do with the center of mass of the vehicle?
User avatar
Oleg
Site Admin
Posts: 14100
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Camera not in correct position in game

Post by Oleg »

It looks like the camera should be somehow adjustable via vehicle's meta, as the automatic calculation given by model bounds does not seems to be the optimal for the artist (as one is likely to put the camera manually in best position). But, so far, all ZModeler-exported models have different camera position than original model even if it was imported/exported with no changes.
Maxdugen
Posts: 33
Joined: Mon Dec 12, 2022 8:40 am

Re: Camera not in correct position in game

Post by Maxdugen »

Do you have any more info on changing camera from metas? Or where I might be able to find out? I’ve been googling this for days and cannot find any info on it.
User avatar
Oleg
Site Admin
Posts: 14100
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: Camera not in correct position in game

Post by Oleg »

search for something like CameraOffset.
if i'm not mistaken, this is a long-standing issue and I don't know whether any solution is available for this or not.

Also, if your vehicle is something big like bus or utility truck and/or has some big collisions, these are likely to cause camera to be even further away. There are some options on collisions to prevent them from moving camera away. but these could cause some visibility issue when camera is moved into collision
Post Reply