mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 11:17:34 +02:00
Add View->Enter First Person Mode in HMD checkbox.
When checked, changing to an HMD display will switch the user to first person mode. WL 21425.
This commit is contained in:
parent
0f9c917965
commit
38baeabbe5
3 changed files with 10 additions and 0 deletions
|
@ -6900,6 +6900,12 @@ void Application::updateDisplayMode() {
|
||||||
// reset the avatar, to set head and hand palms back to a reasonable default pose.
|
// reset the avatar, to set head and hand palms back to a reasonable default pose.
|
||||||
getMyAvatar()->reset(false);
|
getMyAvatar()->reset(false);
|
||||||
|
|
||||||
|
// switch to first person if entering hmd and setting is checked
|
||||||
|
if (isHmd && menu->isOptionChecked(MenuOption::FirstPersonHMD)) {
|
||||||
|
menu->setIsOptionChecked(MenuOption::FirstPerson, true);
|
||||||
|
cameraMenuChanged();
|
||||||
|
}
|
||||||
|
|
||||||
Q_ASSERT_X(_displayPlugin, "Application::updateDisplayMode", "could not find an activated display plugin");
|
Q_ASSERT_X(_displayPlugin, "Application::updateDisplayMode", "could not find an activated display plugin");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -258,6 +258,9 @@ Menu::Menu() {
|
||||||
// View > Overlays
|
// View > Overlays
|
||||||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Overlays, 0, true);
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Overlays, 0, true);
|
||||||
|
|
||||||
|
// View > Enter First Person Mode in HMD
|
||||||
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::FirstPersonHMD, 0, false);
|
||||||
|
|
||||||
// Navigate menu ----------------------------------
|
// Navigate menu ----------------------------------
|
||||||
MenuWrapper* navigateMenu = addMenu("Navigate");
|
MenuWrapper* navigateMenu = addMenu("Navigate");
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,7 @@ namespace MenuOption {
|
||||||
const QString ExpandPhysicsSimulationTiming = "Expand /physics";
|
const QString ExpandPhysicsSimulationTiming = "Expand /physics";
|
||||||
const QString ExpandUpdateTiming = "Expand /update";
|
const QString ExpandUpdateTiming = "Expand /update";
|
||||||
const QString FirstPerson = "First Person";
|
const QString FirstPerson = "First Person";
|
||||||
|
const QString FirstPersonHMD = "Enter First Person Mode in HMD";
|
||||||
const QString FivePointCalibration = "5 Point Calibration";
|
const QString FivePointCalibration = "5 Point Calibration";
|
||||||
const QString FixGaze = "Fix Gaze (no saccade)";
|
const QString FixGaze = "Fix Gaze (no saccade)";
|
||||||
const QString Forward = "Forward";
|
const QString Forward = "Forward";
|
||||||
|
|
Loading…
Reference in a new issue