* disable Avatar "follow" / recentering behavior when using HMD + "View > Mirror"

* restore access to "View > Mirror" from HMD mode
This commit is contained in:
humbletim 2017-08-01 13:41:28 -04:00
parent 5bdaa4daa1
commit 3a9b8c02a6
3 changed files with 6 additions and 8 deletions

View file

@ -4483,11 +4483,9 @@ void Application::cameraModeChanged() {
void Application::cameraMenuChanged() { void Application::cameraMenuChanged() {
auto menu = Menu::getInstance(); auto menu = Menu::getInstance();
if (menu->isOptionChecked(MenuOption::FullscreenMirror)) { if (menu->isOptionChecked(MenuOption::FullscreenMirror)) {
if (isHMDMode()) { if (_myCamera.getMode() != CAMERA_MODE_MIRROR) {
menu->setIsOptionChecked(MenuOption::FullscreenMirror, false);
menu->setIsOptionChecked(MenuOption::FirstPerson, true);
} else if (_myCamera.getMode() != CAMERA_MODE_MIRROR) {
_myCamera.setMode(CAMERA_MODE_MIRROR); _myCamera.setMode(CAMERA_MODE_MIRROR);
getMyAvatar()->reset(false, false, false); // to reset any active MyAvatar::FollowHelpers
} }
} else if (menu->isOptionChecked(MenuOption::FirstPerson)) { } else if (menu->isOptionChecked(MenuOption::FirstPerson)) {
if (_myCamera.getMode() != CAMERA_MODE_FIRST_PERSON) { if (_myCamera.getMode() != CAMERA_MODE_FIRST_PERSON) {

View file

@ -2849,7 +2849,8 @@ bool MyAvatar::FollowHelper::shouldActivateVertical(const MyAvatar& myAvatar, co
void MyAvatar::FollowHelper::prePhysicsUpdate(MyAvatar& myAvatar, const glm::mat4& desiredBodyMatrix, void MyAvatar::FollowHelper::prePhysicsUpdate(MyAvatar& myAvatar, const glm::mat4& desiredBodyMatrix,
const glm::mat4& currentBodyMatrix, bool hasDriveInput) { const glm::mat4& currentBodyMatrix, bool hasDriveInput) {
if (myAvatar.getHMDLeanRecenterEnabled()) { if (myAvatar.getHMDLeanRecenterEnabled() &&
qApp->getCamera().getMode() != CAMERA_MODE_MIRROR) {
if (!isActive(Rotation) && (shouldActivateRotation(myAvatar, desiredBodyMatrix, currentBodyMatrix) || hasDriveInput)) { if (!isActive(Rotation) && (shouldActivateRotation(myAvatar, desiredBodyMatrix, currentBodyMatrix) || hasDriveInput)) {
activate(Rotation); activate(Rotation);
} }

View file

@ -40,9 +40,8 @@ function updateControllerDisplay() {
var button; var button;
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
// Independent and Entity mode make people sick. Third Person and Mirror have traps that we need to work through. // Independent and Entity mode make people sick; disable them in hmd.
// Disable them in hmd. var desktopOnlyViews = ['Independent Mode', 'Entity Mode'];
var desktopOnlyViews = ['Mirror', 'Independent Mode', 'Entity Mode'];
function onHmdChanged(isHmd) { function onHmdChanged(isHmd) {
HMD.closeTablet(); HMD.closeTablet();