ORTS ignores angle values in passenger "Inside" view declarations in .wag and .eng files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Open Rails |
Expired
|
Medium
|
Unassigned |
Bug Description
ORTS appears to ignore the "StartDirection" and "RotationLimit" values in "Inside" view declarations in .eng and .wag files. This shows up when trying to place a passenger view on the observation platform of the last passenger car or the caboose in a train.
The view direction in ORTS is always a heading of zero, which makes the view initially directed at the back wall of the coach, for example, instead of looking back down the tracks. Changing the value in the .wag file is ignored. Also, the mouse is able to rotate the view through 360 degrees rather than being limited by the values in the file.
The ORTS source code appears to include code (TrainCar.cs) to read the view angle when reading a view inside a .eng file, i.e. inside a locomotive cab, but it does not appear to get used.
MSTS reads and applies the values of "StartDirection" and "RotationLimit" correctly. Examples can be found in the Kiha31.eng and the oebarcar.wag in the default MSTS files. Changing the "StartDirection" to ( 0 45 0 ) gives an off-axis view.
I have found this occurs in Release v 0.9, and the current version X1878, and any versions that I have tried between these versions.
Within cameras. cs there are these commented lines:
// RotationXRadian s = MSTSMath.M.Radians( viewPoint. StartDirection. X );
// RotationYRadian s = MSTSMath.M.Radians( viewPoint. StartDirection. Y );
// <CJComment> More useful without resetting. </CJComment>
Uncommenting the two lines things are OK.
I kindly ask one of the enabled developers to perform the change. Else really undesirable viewpoints can be achieved at startup, like the attached one.