Page 1 of 1
Adjusting Camera Height
Posted:
Thu Jan 03, 2013 6:52 am
by GTRdrift34
Hi everyone just wondering if it were possible through coding (not in game) to change the height of the camera view used when racing. In particular the first person view used by pressing the F2 key, it is my preferred view but it is too low, where if possible could i reprogram the height value? Thank you.
Re: Adjusting Camera Height
Posted:
Thu Jan 03, 2013 4:10 pm
by chad3006
Well you can edit the XML code for the particular car(s) you're racing (located in the car's folder); the driver and or the bonnet position. If you're talking about the source code -- I can't help with that.
Re: Adjusting Camera Height
Posted:
Thu Jan 03, 2013 5:41 pm
by mungewell
Re: Adjusting Camera Height
Posted:
Thu Jan 03, 2013 5:45 pm
by mungewell
I should also add; if you think that the default position is wrong for a particular car(s), please suggest 'better' positions here (or with Trac) and we'll get those fixed....
Simon
Re: Adjusting Camera Height
Posted:
Fri Jan 04, 2013 12:58 am
by GTRdrift34
Thanks for the help guys both responses were very useful. I ended up modifying the particular car xml file (sc-boxer-96) and adjusting the bonnet and driver height. It gave me a view which was higher off the ground. I also tweaked some values in the grcam.cpp for the cGrCarCamInfrontFixedCar class, i was trying to increase the value of center[2] but this seemed to change the angle of view in the z axis rather than the height of the forward looking camera. I am trying to get the most realistic view possible as i am looking at collecting gaze fixation data using the simulator so i wanted the most realistic 'viewing' experience for my user studies.
Re: Adjusting Camera Height
Posted:
Fri Jan 04, 2013 5:39 pm
by mungewell
The cameras need an 'eye' position and a 'look at' position (which is projected forward from the 'eye'). I think 'center[2]' is part of the 'look at', hence changing the angle of view.
To keep the view level you want to change both:
Have fun,
Simon
Re: Adjusting Camera Height
Posted:
Mon Feb 04, 2013 4:17 pm
by mungewell