mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 15:24:07 +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);
|
_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
|
// Update bandwidth dialog, if any
|
||||||
|
|
|
@ -210,6 +210,11 @@ Menu::Menu() :
|
||||||
false,
|
false,
|
||||||
appInstance->getWebcam()->getGrabber(),
|
appInstance->getWebcam()->getGrabber(),
|
||||||
SLOT(setLEDTrackingOn(bool)));
|
SLOT(setLEDTrackingOn(bool)));
|
||||||
|
|
||||||
|
addCheckableActionToQMenuAndActionHash(viewMenu,
|
||||||
|
MenuOption::OffAxisProjection,
|
||||||
|
0,
|
||||||
|
false);
|
||||||
|
|
||||||
addDisabledActionAndSeparator(viewMenu, "Stats");
|
addDisabledActionAndSeparator(viewMenu, "Stats");
|
||||||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Stats, Qt::Key_Slash);
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Stats, Qt::Key_Slash);
|
||||||
|
|
|
@ -170,6 +170,7 @@ namespace MenuOption {
|
||||||
const QString LowRes = "Lower Resolution While Moving";
|
const QString LowRes = "Lower Resolution While Moving";
|
||||||
const QString Mirror = "Mirror";
|
const QString Mirror = "Mirror";
|
||||||
const QString OcclusionCulling = "Occlusion Culling";
|
const QString OcclusionCulling = "Occlusion Culling";
|
||||||
|
const QString OffAxisProjection = "Off-Axis Projection";
|
||||||
const QString Oscilloscope = "Audio Oscilloscope";
|
const QString Oscilloscope = "Audio Oscilloscope";
|
||||||
const QString Pair = "Pair";
|
const QString Pair = "Pair";
|
||||||
const QString PasteVoxels = "Paste";
|
const QString PasteVoxels = "Paste";
|
||||||
|
|
Loading…
Reference in a new issue