mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 02:44:30 +02:00
in full-screen mirror camera mode, arrow keys move camera but don't make the avatar walk
This commit is contained in:
parent
9962d47173
commit
40a5e4abc8
2 changed files with 40 additions and 4 deletions
|
@ -63,6 +63,19 @@
|
||||||
["Keyboard.D", "Keyboard.Right", "Keyboard.TouchpadRight"]
|
["Keyboard.D", "Keyboard.Right", "Keyboard.TouchpadRight"]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"when": "Application.CameraFirstPerson",
|
||||||
|
"to": "Actions.Yaw"
|
||||||
|
},
|
||||||
|
{ "from": { "makeAxis" : [
|
||||||
|
["Keyboard.A", "Keyboard.Left", "Keyboard.TouchpadLeft"],
|
||||||
|
["Keyboard.D", "Keyboard.Right", "Keyboard.TouchpadRight"]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"when": "Application.CameraThirdPerson",
|
||||||
|
"to": "Actions.Yaw"
|
||||||
|
},
|
||||||
|
{ "from": { "makeAxis" : [ ["Keyboard.A"], ["Keyboard.D"] ] },
|
||||||
|
"when": "Application.CameraFSM",
|
||||||
"to": "Actions.Yaw"
|
"to": "Actions.Yaw"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -81,9 +94,10 @@
|
||||||
{ "from": "Keyboard.Right", "when": "Keyboard.Shift", "to": "Actions.LATERAL_RIGHT" },
|
{ "from": "Keyboard.Right", "when": "Keyboard.Shift", "to": "Actions.LATERAL_RIGHT" },
|
||||||
{ "from": "Keyboard.Down", "when": "Keyboard.Shift", "to": "Actions.PITCH_DOWN" },
|
{ "from": "Keyboard.Down", "when": "Keyboard.Shift", "to": "Actions.PITCH_DOWN" },
|
||||||
{ "from": "Keyboard.Up", "when": "Keyboard.Shift", "to": "Actions.PITCH_UP" },
|
{ "from": "Keyboard.Up", "when": "Keyboard.Shift", "to": "Actions.PITCH_UP" },
|
||||||
|
{ "from": "Keyboard.Up", "when": "Application.CameraFirstPerson", "to": "Actions.LONGITUDINAL_FORWARD" },
|
||||||
{ "from": "Keyboard.Up", "to": "Actions.LONGITUDINAL_FORWARD" },
|
{ "from": "Keyboard.Up", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_FORWARD" },
|
||||||
{ "from": "Keyboard.Down", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
{ "from": "Keyboard.Down", "when": "Application.CameraFirstPerson", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
||||||
|
{ "from": "Keyboard.Down", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
||||||
|
|
||||||
{ "from": "Keyboard.PgDown", "to": "Actions.VERTICAL_DOWN" },
|
{ "from": "Keyboard.PgDown", "to": "Actions.VERTICAL_DOWN" },
|
||||||
{ "from": "Keyboard.PgUp", "to": "Actions.VERTICAL_UP" },
|
{ "from": "Keyboard.PgUp", "to": "Actions.VERTICAL_UP" },
|
||||||
|
|
|
@ -391,6 +391,11 @@ void messageHandler(QtMsgType type, const QMessageLogContext& context, const QSt
|
||||||
}
|
}
|
||||||
|
|
||||||
static const QString STATE_IN_HMD = "InHMD";
|
static const QString STATE_IN_HMD = "InHMD";
|
||||||
|
static const QString STATE_CAMERA_FULL_SCREEN_MIRROR = "CameraFSM";
|
||||||
|
static const QString STATE_CAMERA_FIRST_PERSON = "CameraFirstPerson";
|
||||||
|
static const QString STATE_CAMERA_THIRD_PERSON = "CameraThirdPerson";
|
||||||
|
static const QString STATE_CAMERA_ENTITY = "CameraEntity";
|
||||||
|
static const QString STATE_CAMERA_INDEPENDENT = "CameraIndependent";
|
||||||
static const QString STATE_SNAP_TURN = "SnapTurn";
|
static const QString STATE_SNAP_TURN = "SnapTurn";
|
||||||
static const QString STATE_GROUNDED = "Grounded";
|
static const QString STATE_GROUNDED = "Grounded";
|
||||||
static const QString STATE_NAV_FOCUSED = "NavigationFocused";
|
static const QString STATE_NAV_FOCUSED = "NavigationFocused";
|
||||||
|
@ -470,7 +475,9 @@ bool setupEssentials(int& argc, char** argv) {
|
||||||
DependencyManager::set<InterfaceActionFactory>();
|
DependencyManager::set<InterfaceActionFactory>();
|
||||||
DependencyManager::set<AudioInjectorManager>();
|
DependencyManager::set<AudioInjectorManager>();
|
||||||
DependencyManager::set<MessagesClient>();
|
DependencyManager::set<MessagesClient>();
|
||||||
controller::StateController::setStateVariables({ { STATE_IN_HMD, STATE_SNAP_TURN, STATE_GROUNDED, STATE_NAV_FOCUSED } });
|
controller::StateController::setStateVariables({ { STATE_IN_HMD, STATE_CAMERA_FULL_SCREEN_MIRROR,
|
||||||
|
STATE_CAMERA_FIRST_PERSON, STATE_CAMERA_THIRD_PERSON, STATE_CAMERA_ENTITY, STATE_CAMERA_INDEPENDENT,
|
||||||
|
STATE_SNAP_TURN, STATE_GROUNDED, STATE_NAV_FOCUSED } });
|
||||||
DependencyManager::set<UserInputMapper>();
|
DependencyManager::set<UserInputMapper>();
|
||||||
DependencyManager::set<controller::ScriptingInterface, ControllerScriptingInterface>();
|
DependencyManager::set<controller::ScriptingInterface, ControllerScriptingInterface>();
|
||||||
DependencyManager::set<InterfaceParentFinder>();
|
DependencyManager::set<InterfaceParentFinder>();
|
||||||
|
@ -954,6 +961,21 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
||||||
_applicationStateDevice->setInputVariant(STATE_IN_HMD, []() -> float {
|
_applicationStateDevice->setInputVariant(STATE_IN_HMD, []() -> float {
|
||||||
return qApp->isHMDMode() ? 1 : 0;
|
return qApp->isHMDMode() ? 1 : 0;
|
||||||
});
|
});
|
||||||
|
_applicationStateDevice->setInputVariant(STATE_CAMERA_FULL_SCREEN_MIRROR, []() -> float {
|
||||||
|
return qApp->getCamera()->getMode() == CAMERA_MODE_MIRROR ? 1 : 0;
|
||||||
|
});
|
||||||
|
_applicationStateDevice->setInputVariant(STATE_CAMERA_FIRST_PERSON, []() -> float {
|
||||||
|
return qApp->getCamera()->getMode() == CAMERA_MODE_FIRST_PERSON ? 1 : 0;
|
||||||
|
});
|
||||||
|
_applicationStateDevice->setInputVariant(STATE_CAMERA_THIRD_PERSON, []() -> float {
|
||||||
|
return qApp->getCamera()->getMode() == CAMERA_MODE_THIRD_PERSON ? 1 : 0;
|
||||||
|
});
|
||||||
|
_applicationStateDevice->setInputVariant(STATE_CAMERA_ENTITY, []() -> float {
|
||||||
|
return qApp->getCamera()->getMode() == CAMERA_MODE_ENTITY ? 1 : 0;
|
||||||
|
});
|
||||||
|
_applicationStateDevice->setInputVariant(STATE_CAMERA_INDEPENDENT, []() -> float {
|
||||||
|
return qApp->getCamera()->getMode() == CAMERA_MODE_INDEPENDENT ? 1 : 0;
|
||||||
|
});
|
||||||
_applicationStateDevice->setInputVariant(STATE_SNAP_TURN, []() -> float {
|
_applicationStateDevice->setInputVariant(STATE_SNAP_TURN, []() -> float {
|
||||||
return qApp->getMyAvatar()->getSnapTurn() ? 1 : 0;
|
return qApp->getMyAvatar()->getSnapTurn() ? 1 : 0;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue