Cameras Views - Changing

From FSDeveloper Wiki
(Redirected from Change cameras views)
Jump to: navigation, search



Introduction

The FSX SDK has detailed instructions for camera definitions, however, isn’t easy to find the right eye view. The saved flight stores the eye view and can be used to find out what are the values for aircraft.cfg entries.

How to

Create a test camera

In the aircraft.cfg create a test camera

[CameraDefinition.0]
Title = "test"
Guid = {AFA06A0A-7341-4b1f-B486-CE3778336276}
Origin = Virtual Cockpit
MomentumEffect = Yes
SnapPbhAdjust = Swivel
SnapPbhReturn = False
PanPbhAdjust = Swivel
PanPbhReturn = False
Track = None
ShowAxis = YES
AllowZoom = TRUE
InitialZoom = 0.75
SmoothZoomTime = 2.0
ZoomPanScalar = 1.0
ShowWeather = Yes
XyzAdjust = TRUE
ShowLensFlare=FALSE
Category = Cockpit
PitchPanRate=20
HeadingPanRate=60
InitialXyz=0, 0, 0.
InitialPbh=0, 0, 0

Note that the InitialXyz and InitialPbh are 0

Change the eye view

Using FSX view pan and rotate commands, position the camera in the direction that you want. Save a flight with the changed eye view position.

Change the aircraft.cfg camera definition

Open the flight flt file it in notepad. Scroll in to the cameras sections and look for the camera with the CameraDefinition GUID. The camera numbers in the flt will not match the camera definition numbers, the GUID is the only way that you have to find the correct entry. The window.1 entry will also reflect the camera GUID in CurrentCamera line.

 [Camera.1.3]
Guid={AFA06A0A-7341-4B1F-B486-CE3778336276}
Zoom=0.75
Translation=0, 0, 0.26635062694549561
Rotation=26.531982421875, 32.49755859375, 0

Using Flt camera definition you can change aircraft.cfg camera definition parameters by using the following translation table:

Zoom -> InitialZoom

Translation -> InitialXyz

Rotation -> InitialPbh. The correspondence isn’t correct. The flt saves Pitch, Heading, bank and the aircraft.cfg needs pitch, bank, heading so there is the need to change the position for the last two values.

The final CameraDefinition.0 will be

 [CameraDefinition.0]
Title = "test"
Guid = {AFA06A0A-7341-4b1f-B486-CE3778336276}
Origin = Virtual Cockpit
MomentumEffect = Yes
SnapPbhAdjust = Swivel
SnapPbhReturn = False
PanPbhAdjust = Swivel
PanPbhReturn = False
Track = None
ShowAxis = YES
AllowZoom = TRUE
InitialZoom = 0.75
SmoothZoomTime = 2.0
ZoomPanScalar = 1.0
ShowWeather = Yes
XyzAdjust = TRUE
ShowLensFlare=FALSE
Category = Cockpit
PitchPanRate=20
HeadingPanRate=60
InitialXyz=0, 0, 0.26635062694549561.
InitialPbh=26.531982421875, 0, 32.49755859375


--jcboliveira