1
0
Fork 0

Implement internal moving views

This commit is contained in:
hayden2000 2020-03-15 23:08:02 -04:00
parent 0efcc4d270
commit 66a4cc0501

View file

@ -731,9 +731,125 @@ var resetView = func() {
}
interpolate("sim/current-view/field-of-view", 63, 0.66);
interpolate("sim/current-view/heading-offset-deg", hd_t,0.66);
interpolate("sim/current-view/pitch-offset-deg", -14.6,0.66);
interpolate("sim/current-view/heading-offset-deg", hd_t, 0.66);
interpolate("sim/current-view/pitch-offset-deg", -14.6, 0.66);
interpolate("sim/current-view/roll-offset-deg", 0, 0.66);
interpolate("sim/current-view/x-offset-m", -0.45, 0.66);
interpolate("sim/current-view/y-offset-m", 2.34, 0.66);
interpolate("sim/current-view/z-offset-m", -13.75, 0.66);
if (_shakeFlag) {
setprop("sim/rendering/headshake/enabled", 1);
}
}
}
var autopilotView = func() {
if (getprop("sim/current-view/view-number") == 0) {
if (getprop("sim/rendering/headshake/enabled")) {
var _shakeFlag = 1;
setprop("sim/rendering/headshake/enabled", 0);
} else {
var _shakeFlag = 0;
}
var hd = getprop("sim/current-view/heading-offset-deg");
var hd_t = 341.7;
if (hd < 180) {
hd_t = hd_t - 360;
}
interpolate("sim/current-view/field-of-view", 63, 0.66);
interpolate("sim/current-view/heading-offset-deg", hd_t, 0.66);
interpolate("sim/current-view/pitch-offset-deg", -16.4, 0.66);
interpolate("sim/current-view/roll-offset-deg", 0, 0.66);
interpolate("sim/current-view/x-offset-m", -0.45, 0.66);
interpolate("sim/current-view/y-offset-m", 2.34, 0.66);
interpolate("sim/current-view/z-offset-m", -13.75, 0.66);
if (_shakeFlag) {
setprop("sim/rendering/headshake/enabled", 1);
}
}
}
var overheadView = func() {
if (getprop("sim/current-view/view-number") == 0) {
if (getprop("sim/rendering/headshake/enabled")) {
var _shakeFlag = 1;
setprop("sim/rendering/headshake/enabled", 0);
} else {
var _shakeFlag = 0;
}
var hd = getprop("sim/current-view/heading-offset-deg");
var hd_t = 348;
if (hd < 180) {
hd_t = hd_t - 360;
}
interpolate("sim/current-view/field-of-view", 105.8, 0.66);
interpolate("sim/current-view/heading-offset-deg", hd_t, 0.66);
interpolate("sim/current-view/pitch-offset-deg", 65.25, 0.66);
interpolate("sim/current-view/roll-offset-deg", 0,0.66);
interpolate("sim/current-view/x-offset-m", -0.12, 0.66);
interpolate("sim/current-view/y-offset-m", 2.34, 0.66);
interpolate("sim/current-view/z-offset-m", -13.75, 0.66);
if (_shakeFlag) {
setprop("sim/rendering/headshake/enabled", 1);
}
}
}
var pedestalView = func() {
if (getprop("sim/current-view/view-number") == 0) {
if (getprop("sim/rendering/headshake/enabled")) {
var _shakeFlag = 1;
setprop("sim/rendering/headshake/enabled", 0);
} else {
var _shakeFlag = 0;
}
var hd = getprop("sim/current-view/heading-offset-deg");
var hd_t = 315;
if (hd < 180) {
hd_t = hd_t - 360;
}
interpolate("sim/current-view/field-of-view", 63, 0.66);
interpolate("sim/current-view/heading-offset-deg", hd_t, 0.66);
interpolate("sim/current-view/pitch-offset-deg", -46.3, 0.66);
interpolate("sim/current-view/roll-offset-deg", 0, 0.66);
interpolate("sim/current-view/x-offset-m", -0.45, 0.66);
interpolate("sim/current-view/y-offset-m", 2.34, 0.66);
interpolate("sim/current-view/z-offset-m", -13.75, 0.66);
if (_shakeFlag) {
setprop("sim/rendering/headshake/enabled", 1);
}
}
}
var lightsView = func() {
if (getprop("sim/current-view/view-number") == 0) {
if (getprop("sim/rendering/headshake/enabled")) {
var _shakeFlag = 1;
setprop("sim/rendering/headshake/enabled", 0);
} else {
var _shakeFlag = 0;
}
var hd = getprop("sim/current-view/heading-offset-deg");
var hd_t = 335;
if (hd < 180) {
hd_t = hd_t - 360;
}
interpolate("sim/current-view/field-of-view", 63, 0.66);
interpolate("sim/current-view/heading-offset-deg", hd_t, 0.66);
interpolate("sim/current-view/pitch-offset-deg", 10.6, 0.66);
interpolate("sim/current-view/roll-offset-deg", 0, 0.66);
interpolate("sim/current-view/x-offset-m", -0.45, 0.66);
interpolate("sim/current-view/y-offset-m", 2.34, 0.66);
interpolate("sim/current-view/z-offset-m", -13.75, 0.66);