take into account headtracking offsets in the view
This commit is contained in:
parent
7847418005
commit
0bca9e75b0
1 changed files with 9 additions and 0 deletions
|
@ -748,6 +748,15 @@ static void getViewOffsets(
|
||||||
offset.z() -= ViewPropertyEvaluator::getDoubleValue("(/sim/view[(/sim/current-view/view-number-raw)]/config/z-offset-m)");
|
offset.z() -= ViewPropertyEvaluator::getDoubleValue("(/sim/view[(/sim/current-view/view-number-raw)]/config/z-offset-m)");
|
||||||
offset_m += offset;
|
offset_m += offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle headtracking :
|
||||||
|
Add offsets coming from the headtracker if there is one. The headtracker offsets have to be added ; they
|
||||||
|
cannot replace /sim/currentview/config/?-offset-m otherwise the offsets of each view are lost, making the
|
||||||
|
headtracking position unusable. */
|
||||||
|
offset_m.x() += ViewPropertyEvaluator::getDoubleValue("(/sim/viewer/camera-offset-x)");
|
||||||
|
offset_m.y() += ViewPropertyEvaluator::getDoubleValue("(/sim/viewer/camera-offset-y)");
|
||||||
|
offset_m.z() += ViewPropertyEvaluator::getDoubleValue("(/sim/viewer/camera-offset-z)");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// recalculate for LookFrom view type...
|
// recalculate for LookFrom view type...
|
||||||
|
|
Loading…
Add table
Reference in a new issue