mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
Apply eye offset position based on Faceshift/webcam.
This commit is contained in:
parent
a60be83fc7
commit
1532b5d91a
3 changed files with 15 additions and 0 deletions
|
@ -1800,6 +1800,15 @@ void Application::update(float deltaTime) {
|
|||
_myCamera.setModeShiftRate(1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::OffAxisProjection)) {
|
||||
if (_faceshift.isActive()) {
|
||||
_myCamera.setEyeOffsetPosition(_faceshift.getHeadTranslation());
|
||||
|
||||
} else if (_webcam.isActive()) {
|
||||
_myCamera.setEyeOffsetPosition(_webcam.getEstimatedPosition());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update bandwidth dialog, if any
|
||||
|
|
|
@ -210,6 +210,11 @@ Menu::Menu() :
|
|||
false,
|
||||
appInstance->getWebcam()->getGrabber(),
|
||||
SLOT(setLEDTrackingOn(bool)));
|
||||
|
||||
addCheckableActionToQMenuAndActionHash(viewMenu,
|
||||
MenuOption::OffAxisProjection,
|
||||
0,
|
||||
false);
|
||||
|
||||
addDisabledActionAndSeparator(viewMenu, "Stats");
|
||||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Stats, Qt::Key_Slash);
|
||||
|
|
|
@ -170,6 +170,7 @@ namespace MenuOption {
|
|||
const QString LowRes = "Lower Resolution While Moving";
|
||||
const QString Mirror = "Mirror";
|
||||
const QString OcclusionCulling = "Occlusion Culling";
|
||||
const QString OffAxisProjection = "Off-Axis Projection";
|
||||
const QString Oscilloscope = "Audio Oscilloscope";
|
||||
const QString Pair = "Pair";
|
||||
const QString PasteVoxels = "Paste";
|
||||
|
|
Loading…
Reference in a new issue