mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:37:51 +02:00
Merge pull request #16368 from luiscuenca/enableFirstPersonCameraLegacy
DEV-2413: Restate legacy first person camera mode
This commit is contained in:
commit
3f711b7427
14 changed files with 101 additions and 49 deletions
|
@ -78,6 +78,15 @@
|
||||||
"to": "Actions.Yaw"
|
"to": "Actions.Yaw"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ "from": { "makeAxis" : [
|
||||||
|
["Keyboard.Left"],
|
||||||
|
["Keyboard.Right"]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"when": ["Application.CameraFirstPersonLookat", "!Keyboard.Shift"],
|
||||||
|
"to": "Actions.Yaw"
|
||||||
|
},
|
||||||
|
|
||||||
{ "from": { "makeAxis" : [
|
{ "from": { "makeAxis" : [
|
||||||
["Keyboard.Left"],
|
["Keyboard.Left"],
|
||||||
["Keyboard.Right"]
|
["Keyboard.Right"]
|
||||||
|
@ -114,6 +123,15 @@
|
||||||
"to": "Actions.Yaw"
|
"to": "Actions.Yaw"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ "from": { "makeAxis" : [
|
||||||
|
["Keyboard.A"],
|
||||||
|
["Keyboard.D"]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"when": ["Application.CameraFirstPersonLookat", "!Keyboard.Control"],
|
||||||
|
"to": "Actions.Yaw"
|
||||||
|
},
|
||||||
|
|
||||||
{ "from": { "makeAxis" : [
|
{ "from": { "makeAxis" : [
|
||||||
["Keyboard.A"],
|
["Keyboard.A"],
|
||||||
["Keyboard.D"]
|
["Keyboard.D"]
|
||||||
|
@ -150,6 +168,15 @@
|
||||||
"to": "Actions.Yaw"
|
"to": "Actions.Yaw"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ "from": { "makeAxis" : [
|
||||||
|
["Keyboard.TouchpadLeft"],
|
||||||
|
["Keyboard.TouchpadRight"]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"when": "Application.CameraFirstPersonLookat",
|
||||||
|
"to": "Actions.Yaw"
|
||||||
|
},
|
||||||
|
|
||||||
{ "from": { "makeAxis" : [
|
{ "from": { "makeAxis" : [
|
||||||
["Keyboard.TouchpadLeft"],
|
["Keyboard.TouchpadLeft"],
|
||||||
["Keyboard.TouchpadRight"]
|
["Keyboard.TouchpadRight"]
|
||||||
|
@ -222,10 +249,12 @@
|
||||||
{ "from": "Keyboard.Left", "when": "Keyboard.Shift", "to": "Actions.LATERAL_LEFT" },
|
{ "from": "Keyboard.Left", "when": "Keyboard.Shift", "to": "Actions.LATERAL_LEFT" },
|
||||||
{ "from": "Keyboard.Right", "when": "Keyboard.Shift", "to": "Actions.LATERAL_RIGHT" },
|
{ "from": "Keyboard.Right", "when": "Keyboard.Shift", "to": "Actions.LATERAL_RIGHT" },
|
||||||
{ "from": "Keyboard.Up", "when": "Application.CameraFirstPerson", "to": "Actions.LONGITUDINAL_FORWARD" },
|
{ "from": "Keyboard.Up", "when": "Application.CameraFirstPerson", "to": "Actions.LONGITUDINAL_FORWARD" },
|
||||||
|
{ "from": "Keyboard.Up", "when": "Application.CameraFirstPersonLookat", "to": "Actions.LONGITUDINAL_FORWARD" },
|
||||||
{ "from": "Keyboard.Up", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_FORWARD" },
|
{ "from": "Keyboard.Up", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_FORWARD" },
|
||||||
{ "from": "Keyboard.Up", "when": "Application.CameraLookAt", "to": "Actions.LONGITUDINAL_FORWARD" },
|
{ "from": "Keyboard.Up", "when": "Application.CameraLookAt", "to": "Actions.LONGITUDINAL_FORWARD" },
|
||||||
{ "from": "Keyboard.Up", "when": "Application.CameraSelfie", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
{ "from": "Keyboard.Up", "when": "Application.CameraSelfie", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
||||||
{ "from": "Keyboard.Down", "when": "Application.CameraFirstPerson", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
{ "from": "Keyboard.Down", "when": "Application.CameraFirstPerson", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
||||||
|
{ "from": "Keyboard.Down", "when": "Application.CameraFirstPersonLookat", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
||||||
{ "from": "Keyboard.Down", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
{ "from": "Keyboard.Down", "when": "Application.CameraThirdPerson", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
||||||
{ "from": "Keyboard.Down", "when": "Application.CameraLookAt", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
{ "from": "Keyboard.Down", "when": "Application.CameraLookAt", "to": "Actions.LONGITUDINAL_BACKWARD" },
|
||||||
{ "from": "Keyboard.Down", "when": "Application.CameraSelfie", "to": "Actions.LONGITUDINAL_FORWARD" },
|
{ "from": "Keyboard.Down", "when": "Application.CameraSelfie", "to": "Actions.LONGITUDINAL_FORWARD" },
|
||||||
|
|
|
@ -225,9 +225,9 @@ Flickable {
|
||||||
SimplifiedControls.RadioButton {
|
SimplifiedControls.RadioButton {
|
||||||
id: firstPerson
|
id: firstPerson
|
||||||
text: "First Person View"
|
text: "First Person View"
|
||||||
checked: Camera.mode === "first person"
|
checked: Camera.mode === "first person look at"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Camera.mode = "first person"
|
Camera.mode = "first person look at"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ Flickable {
|
||||||
target: Camera
|
target: Camera
|
||||||
|
|
||||||
onModeUpdated: {
|
onModeUpdated: {
|
||||||
if (Camera.mode === "first person") {
|
if (Camera.mode === "first person look at") {
|
||||||
firstPerson.checked = true
|
firstPerson.checked = true
|
||||||
} else if (Camera.mode === "look at") {
|
} else if (Camera.mode === "look at") {
|
||||||
thirdPerson.checked = true
|
thirdPerson.checked = true
|
||||||
|
|
|
@ -718,6 +718,7 @@ private:
|
||||||
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_FULL_SCREEN_MIRROR = "CameraFSM";
|
||||||
static const QString STATE_CAMERA_FIRST_PERSON = "CameraFirstPerson";
|
static const QString STATE_CAMERA_FIRST_PERSON = "CameraFirstPerson";
|
||||||
|
static const QString STATE_CAMERA_FIRST_PERSON_LOOK_AT = "CameraFirstPersonLookat";
|
||||||
static const QString STATE_CAMERA_THIRD_PERSON = "CameraThirdPerson";
|
static const QString STATE_CAMERA_THIRD_PERSON = "CameraThirdPerson";
|
||||||
static const QString STATE_CAMERA_ENTITY = "CameraEntity";
|
static const QString STATE_CAMERA_ENTITY = "CameraEntity";
|
||||||
static const QString STATE_CAMERA_INDEPENDENT = "CameraIndependent";
|
static const QString STATE_CAMERA_INDEPENDENT = "CameraIndependent";
|
||||||
|
@ -939,7 +940,8 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {
|
||||||
DependencyManager::set<AudioInjectorManager>();
|
DependencyManager::set<AudioInjectorManager>();
|
||||||
DependencyManager::set<MessagesClient>();
|
DependencyManager::set<MessagesClient>();
|
||||||
controller::StateController::setStateVariables({ { STATE_IN_HMD, STATE_CAMERA_FULL_SCREEN_MIRROR,
|
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_CAMERA_LOOK_AT, STATE_CAMERA_SELFIE,
|
STATE_CAMERA_FIRST_PERSON, STATE_CAMERA_FIRST_PERSON_LOOK_AT, STATE_CAMERA_THIRD_PERSON,
|
||||||
|
STATE_CAMERA_ENTITY, STATE_CAMERA_INDEPENDENT, STATE_CAMERA_LOOK_AT, STATE_CAMERA_SELFIE,
|
||||||
STATE_SNAP_TURN, STATE_ADVANCED_MOVEMENT_CONTROLS, STATE_GROUNDED, STATE_NAV_FOCUSED,
|
STATE_SNAP_TURN, STATE_ADVANCED_MOVEMENT_CONTROLS, STATE_GROUNDED, STATE_NAV_FOCUSED,
|
||||||
STATE_PLATFORM_WINDOWS, STATE_PLATFORM_MAC, STATE_PLATFORM_ANDROID, STATE_LEFT_HAND_DOMINANT, STATE_RIGHT_HAND_DOMINANT, STATE_STRAFE_ENABLED } });
|
STATE_PLATFORM_WINDOWS, STATE_PLATFORM_MAC, STATE_PLATFORM_ANDROID, STATE_LEFT_HAND_DOMINANT, STATE_RIGHT_HAND_DOMINANT, STATE_STRAFE_ENABLED } });
|
||||||
DependencyManager::set<UserInputMapper>();
|
DependencyManager::set<UserInputMapper>();
|
||||||
|
@ -1887,6 +1889,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
_applicationStateDevice->setInputVariant(STATE_CAMERA_FIRST_PERSON, []() -> float {
|
_applicationStateDevice->setInputVariant(STATE_CAMERA_FIRST_PERSON, []() -> float {
|
||||||
return qApp->getCamera().getMode() == CAMERA_MODE_FIRST_PERSON ? 1 : 0;
|
return qApp->getCamera().getMode() == CAMERA_MODE_FIRST_PERSON ? 1 : 0;
|
||||||
});
|
});
|
||||||
|
_applicationStateDevice->setInputVariant(STATE_CAMERA_FIRST_PERSON_LOOK_AT, []() -> float {
|
||||||
|
return qApp->getCamera().getMode() == CAMERA_MODE_FIRST_PERSON_LOOK_AT ? 1 : 0;
|
||||||
|
});
|
||||||
_applicationStateDevice->setInputVariant(STATE_CAMERA_THIRD_PERSON, []() -> float {
|
_applicationStateDevice->setInputVariant(STATE_CAMERA_THIRD_PERSON, []() -> float {
|
||||||
return qApp->getCamera().getMode() == CAMERA_MODE_THIRD_PERSON ? 1 : 0;
|
return qApp->getCamera().getMode() == CAMERA_MODE_THIRD_PERSON ? 1 : 0;
|
||||||
});
|
});
|
||||||
|
@ -1996,7 +2001,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
settingsTimer->start();
|
settingsTimer->start();
|
||||||
}, QThread::LowestPriority);
|
}, QThread::LowestPriority);
|
||||||
|
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::FirstPerson)) {
|
if (Menu::getInstance()->isOptionChecked(MenuOption::FirstPersonLookAt)) {
|
||||||
getMyAvatar()->setBoomLength(MyAvatar::ZOOM_MIN); // So that camera doesn't auto-switch to third person.
|
getMyAvatar()->setBoomLength(MyAvatar::ZOOM_MIN); // So that camera doesn't auto-switch to third person.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3627,12 +3632,15 @@ void Application::updateCamera(RenderArgs& renderArgs, float deltaTime) {
|
||||||
// Using the latter will cause the camera to wobble with idle animations,
|
// Using the latter will cause the camera to wobble with idle animations,
|
||||||
// or with changes from the face tracker
|
// or with changes from the face tracker
|
||||||
CameraMode mode = _myCamera.getMode();
|
CameraMode mode = _myCamera.getMode();
|
||||||
if (mode == CAMERA_MODE_FIRST_PERSON) {
|
if (mode == CAMERA_MODE_FIRST_PERSON || mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT) {
|
||||||
_thirdPersonHMDCameraBoomValid= false;
|
_thirdPersonHMDCameraBoomValid= false;
|
||||||
if (isHMDMode()) {
|
if (isHMDMode()) {
|
||||||
mat4 camMat = myAvatar->getSensorToWorldMatrix() * myAvatar->getHMDSensorMatrix();
|
mat4 camMat = myAvatar->getSensorToWorldMatrix() * myAvatar->getHMDSensorMatrix();
|
||||||
_myCamera.setPosition(extractTranslation(camMat));
|
_myCamera.setPosition(extractTranslation(camMat));
|
||||||
_myCamera.setOrientation(glmExtractRotation(camMat));
|
_myCamera.setOrientation(glmExtractRotation(camMat));
|
||||||
|
} else if (mode == CAMERA_MODE_FIRST_PERSON) {
|
||||||
|
_myCamera.setPosition(myAvatar->getDefaultEyePosition());
|
||||||
|
_myCamera.setOrientation(myAvatar->getMyHead()->getHeadOrientation());
|
||||||
} else {
|
} else {
|
||||||
_myCamera.setPosition(myAvatar->getCameraEyesPosition(deltaTime));
|
_myCamera.setPosition(myAvatar->getCameraEyesPosition(deltaTime));
|
||||||
_myCamera.setOrientation(myAvatar->getLookAtRotation());
|
_myCamera.setOrientation(myAvatar->getLookAtRotation());
|
||||||
|
@ -4423,7 +4431,7 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
|
|
||||||
case Qt::Key_1: {
|
case Qt::Key_1: {
|
||||||
Menu* menu = Menu::getInstance();
|
Menu* menu = Menu::getInstance();
|
||||||
menu->triggerOption(MenuOption::FirstPerson);
|
menu->triggerOption(MenuOption::FirstPersonLookAt);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Qt::Key_2: {
|
case Qt::Key_2: {
|
||||||
|
@ -5508,7 +5516,7 @@ void Application::loadSettings() {
|
||||||
isFirstPerson = menu->isOptionChecked(MenuOption::FirstPersonHMD);
|
isFirstPerson = menu->isOptionChecked(MenuOption::FirstPersonHMD);
|
||||||
} else {
|
} else {
|
||||||
// if HMD is not active, only use first person if the menu option is checked
|
// if HMD is not active, only use first person if the menu option is checked
|
||||||
isFirstPerson = menu->isOptionChecked(MenuOption::FirstPerson);
|
isFirstPerson = menu->isOptionChecked(MenuOption::FirstPersonLookAt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5523,9 +5531,9 @@ void Application::loadSettings() {
|
||||||
|
|
||||||
// finish initializing the camera, based on everything we checked above. Third person camera will be used if no settings
|
// finish initializing the camera, based on everything we checked above. Third person camera will be used if no settings
|
||||||
// dictated that we should be in first person
|
// dictated that we should be in first person
|
||||||
Menu::getInstance()->setIsOptionChecked(MenuOption::FirstPerson, isFirstPerson);
|
Menu::getInstance()->setIsOptionChecked(MenuOption::FirstPersonLookAt, isFirstPerson);
|
||||||
Menu::getInstance()->setIsOptionChecked(MenuOption::ThirdPerson, !isFirstPerson);
|
Menu::getInstance()->setIsOptionChecked(MenuOption::ThirdPerson, !isFirstPerson);
|
||||||
_myCamera.setMode((isFirstPerson) ? CAMERA_MODE_FIRST_PERSON : CAMERA_MODE_LOOK_AT);
|
_myCamera.setMode((isFirstPerson) ? CAMERA_MODE_FIRST_PERSON_LOOK_AT : CAMERA_MODE_LOOK_AT);
|
||||||
cameraMenuChanged();
|
cameraMenuChanged();
|
||||||
|
|
||||||
auto inputs = pluginManager->getInputPlugins();
|
auto inputs = pluginManager->getInputPlugins();
|
||||||
|
@ -5689,7 +5697,7 @@ void Application::pauseUntilLoginDetermined() {
|
||||||
menu->getMenu("Developer")->setVisible(false);
|
menu->getMenu("Developer")->setVisible(false);
|
||||||
}
|
}
|
||||||
_previousCameraMode = _myCamera.getMode();
|
_previousCameraMode = _myCamera.getMode();
|
||||||
_myCamera.setMode(CAMERA_MODE_FIRST_PERSON);
|
_myCamera.setMode(CAMERA_MODE_FIRST_PERSON_LOOK_AT);
|
||||||
cameraModeChanged();
|
cameraModeChanged();
|
||||||
|
|
||||||
// disconnect domain handler.
|
// disconnect domain handler.
|
||||||
|
@ -5878,11 +5886,11 @@ void Application::cycleCamera() {
|
||||||
if (menu->isOptionChecked(MenuOption::FullscreenMirror)) {
|
if (menu->isOptionChecked(MenuOption::FullscreenMirror)) {
|
||||||
|
|
||||||
menu->setIsOptionChecked(MenuOption::FullscreenMirror, false);
|
menu->setIsOptionChecked(MenuOption::FullscreenMirror, false);
|
||||||
menu->setIsOptionChecked(MenuOption::FirstPerson, true);
|
menu->setIsOptionChecked(MenuOption::FirstPersonLookAt, true);
|
||||||
|
|
||||||
} else if (menu->isOptionChecked(MenuOption::FirstPerson)) {
|
} else if (menu->isOptionChecked(MenuOption::FirstPersonLookAt)) {
|
||||||
|
|
||||||
menu->setIsOptionChecked(MenuOption::FirstPerson, false);
|
menu->setIsOptionChecked(MenuOption::FirstPersonLookAt, false);
|
||||||
menu->setIsOptionChecked(MenuOption::LookAtCamera, true);
|
menu->setIsOptionChecked(MenuOption::LookAtCamera, true);
|
||||||
|
|
||||||
} else if (menu->isOptionChecked(MenuOption::LookAtCamera)) {
|
} else if (menu->isOptionChecked(MenuOption::LookAtCamera)) {
|
||||||
|
@ -5901,8 +5909,8 @@ void Application::cycleCamera() {
|
||||||
|
|
||||||
void Application::cameraModeChanged() {
|
void Application::cameraModeChanged() {
|
||||||
switch (_myCamera.getMode()) {
|
switch (_myCamera.getMode()) {
|
||||||
case CAMERA_MODE_FIRST_PERSON:
|
case CAMERA_MODE_FIRST_PERSON_LOOK_AT:
|
||||||
Menu::getInstance()->setIsOptionChecked(MenuOption::FirstPerson, true);
|
Menu::getInstance()->setIsOptionChecked(MenuOption::FirstPersonLookAt, true);
|
||||||
break;
|
break;
|
||||||
case CAMERA_MODE_LOOK_AT:
|
case CAMERA_MODE_LOOK_AT:
|
||||||
Menu::getInstance()->setIsOptionChecked(MenuOption::LookAtCamera, true);
|
Menu::getInstance()->setIsOptionChecked(MenuOption::LookAtCamera, true);
|
||||||
|
@ -5922,12 +5930,12 @@ void Application::changeViewAsNeeded(float boomLength) {
|
||||||
// This is called when the boom length has changed
|
// This is called when the boom length has changed
|
||||||
bool boomLengthGreaterThanMinimum = (boomLength > MyAvatar::ZOOM_MIN);
|
bool boomLengthGreaterThanMinimum = (boomLength > MyAvatar::ZOOM_MIN);
|
||||||
|
|
||||||
if (_myCamera.getMode() == CAMERA_MODE_FIRST_PERSON && boomLengthGreaterThanMinimum) {
|
if (_myCamera.getMode() == CAMERA_MODE_FIRST_PERSON_LOOK_AT && boomLengthGreaterThanMinimum) {
|
||||||
Menu::getInstance()->setIsOptionChecked(MenuOption::FirstPerson, false);
|
Menu::getInstance()->setIsOptionChecked(MenuOption::FirstPersonLookAt, false);
|
||||||
Menu::getInstance()->setIsOptionChecked(MenuOption::LookAtCamera, true);
|
Menu::getInstance()->setIsOptionChecked(MenuOption::LookAtCamera, true);
|
||||||
cameraMenuChanged();
|
cameraMenuChanged();
|
||||||
} else if (_myCamera.getMode() == CAMERA_MODE_LOOK_AT && !boomLengthGreaterThanMinimum) {
|
} else if (_myCamera.getMode() == CAMERA_MODE_LOOK_AT && !boomLengthGreaterThanMinimum) {
|
||||||
Menu::getInstance()->setIsOptionChecked(MenuOption::FirstPerson, true);
|
Menu::getInstance()->setIsOptionChecked(MenuOption::FirstPersonLookAt, true);
|
||||||
Menu::getInstance()->setIsOptionChecked(MenuOption::LookAtCamera, false);
|
Menu::getInstance()->setIsOptionChecked(MenuOption::LookAtCamera, false);
|
||||||
cameraMenuChanged();
|
cameraMenuChanged();
|
||||||
}
|
}
|
||||||
|
@ -5935,9 +5943,9 @@ void Application::changeViewAsNeeded(float boomLength) {
|
||||||
|
|
||||||
void Application::cameraMenuChanged() {
|
void Application::cameraMenuChanged() {
|
||||||
auto menu = Menu::getInstance();
|
auto menu = Menu::getInstance();
|
||||||
if (menu->isOptionChecked(MenuOption::FirstPerson)) {
|
if (menu->isOptionChecked(MenuOption::FirstPersonLookAt)) {
|
||||||
if (_myCamera.getMode() != CAMERA_MODE_FIRST_PERSON) {
|
if (_myCamera.getMode() != CAMERA_MODE_FIRST_PERSON_LOOK_AT) {
|
||||||
_myCamera.setMode(CAMERA_MODE_FIRST_PERSON);
|
_myCamera.setMode(CAMERA_MODE_FIRST_PERSON_LOOK_AT);
|
||||||
getMyAvatar()->setBoomLength(MyAvatar::ZOOM_MIN);
|
getMyAvatar()->setBoomLength(MyAvatar::ZOOM_MIN);
|
||||||
}
|
}
|
||||||
} else if (menu->isOptionChecked(MenuOption::LookAtCamera)) {
|
} else if (menu->isOptionChecked(MenuOption::LookAtCamera)) {
|
||||||
|
@ -9038,7 +9046,7 @@ void Application::setDisplayPlugin(DisplayPluginPointer newDisplayPlugin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isHmd && menu->isOptionChecked(MenuOption::FirstPersonHMD)) {
|
if (isHmd && menu->isOptionChecked(MenuOption::FirstPersonHMD)) {
|
||||||
menu->setIsOptionChecked(MenuOption::FirstPerson, true);
|
menu->setIsOptionChecked(MenuOption::FirstPersonLookAt, true);
|
||||||
cameraMenuChanged();
|
cameraMenuChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,7 @@ Menu::Menu() {
|
||||||
|
|
||||||
// View > First Person
|
// View > First Person
|
||||||
auto firstPersonAction = cameraModeGroup->addAction(addCheckableActionToQMenuAndActionHash(
|
auto firstPersonAction = cameraModeGroup->addAction(addCheckableActionToQMenuAndActionHash(
|
||||||
viewMenu, MenuOption::FirstPerson, 0,
|
viewMenu, MenuOption::FirstPersonLookAt, 0,
|
||||||
true, qApp, SLOT(cameraMenuChanged())));
|
true, qApp, SLOT(cameraMenuChanged())));
|
||||||
|
|
||||||
firstPersonAction->setProperty(EXCLUSION_GROUP_KEY, QVariant::fromValue(cameraModeGroup));
|
firstPersonAction->setProperty(EXCLUSION_GROUP_KEY, QVariant::fromValue(cameraModeGroup));
|
||||||
|
|
|
@ -111,7 +111,8 @@ namespace MenuOption {
|
||||||
const QString ExpandSimulationTiming = "Expand /simulation";
|
const QString ExpandSimulationTiming = "Expand /simulation";
|
||||||
const QString ExpandPhysicsTiming = "Expand /physics";
|
const QString ExpandPhysicsTiming = "Expand /physics";
|
||||||
const QString ExpandUpdateTiming = "Expand /update";
|
const QString ExpandUpdateTiming = "Expand /update";
|
||||||
const QString FirstPerson = "First Person";
|
const QString FirstPerson = "First Person Legacy";
|
||||||
|
const QString FirstPersonLookAt = "First Person";
|
||||||
const QString FirstPersonHMD = "Enter First Person Mode in HMD";
|
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)";
|
||||||
|
|
|
@ -958,7 +958,8 @@ void MyAvatar::simulate(float deltaTime, bool inView) {
|
||||||
head->setScale(getModelScale());
|
head->setScale(getModelScale());
|
||||||
head->simulate(deltaTime);
|
head->simulate(deltaTime);
|
||||||
CameraMode mode = qApp->getCamera().getMode();
|
CameraMode mode = qApp->getCamera().getMode();
|
||||||
if (_scriptControlsHeadLookAt || mode == CAMERA_MODE_FIRST_PERSON || mode == CAMERA_MODE_LOOK_AT || mode == CAMERA_MODE_SELFIE) {
|
if (_scriptControlsHeadLookAt || mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT || mode == CAMERA_MODE_FIRST_PERSON ||
|
||||||
|
mode == CAMERA_MODE_LOOK_AT || mode == CAMERA_MODE_SELFIE) {
|
||||||
if (!_pointAtActive || !_isPointTargetValid) {
|
if (!_pointAtActive || !_isPointTargetValid) {
|
||||||
updateHeadLookAt(deltaTime);
|
updateHeadLookAt(deltaTime);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2178,7 +2179,7 @@ void MyAvatar::computeMyLookAtTarget(const AvatarHash& hash) {
|
||||||
glm::vec3 myForward = _lookAtYaw * IDENTITY_FORWARD;
|
glm::vec3 myForward = _lookAtYaw * IDENTITY_FORWARD;
|
||||||
glm::vec3 myPosition = getHead()->getEyePosition();
|
glm::vec3 myPosition = getHead()->getEyePosition();
|
||||||
CameraMode mode = qApp->getCamera().getMode();
|
CameraMode mode = qApp->getCamera().getMode();
|
||||||
if (mode == CAMERA_MODE_FIRST_PERSON) {
|
if (mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT || mode == CAMERA_MODE_FIRST_PERSON) {
|
||||||
myPosition = qApp->getCamera().getPosition();
|
myPosition = qApp->getCamera().getPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2719,7 +2720,7 @@ void MyAvatar::updateMotors() {
|
||||||
if (_characterController.getState() == CharacterController::State::Hover ||
|
if (_characterController.getState() == CharacterController::State::Hover ||
|
||||||
_characterController.computeCollisionMask() == BULLET_COLLISION_MASK_COLLISIONLESS) {
|
_characterController.computeCollisionMask() == BULLET_COLLISION_MASK_COLLISIONLESS) {
|
||||||
CameraMode mode = qApp->getCamera().getMode();
|
CameraMode mode = qApp->getCamera().getMode();
|
||||||
if (!qApp->isHMDMode() && (mode == CAMERA_MODE_FIRST_PERSON || mode == CAMERA_MODE_LOOK_AT || mode == CAMERA_MODE_SELFIE)) {
|
if (!qApp->isHMDMode() && (mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT || mode == CAMERA_MODE_LOOK_AT || mode == CAMERA_MODE_SELFIE)) {
|
||||||
motorRotation = getLookAtRotation();
|
motorRotation = getLookAtRotation();
|
||||||
} else {
|
} else {
|
||||||
motorRotation = getMyHead()->getHeadOrientation();
|
motorRotation = getMyHead()->getHeadOrientation();
|
||||||
|
@ -3399,7 +3400,8 @@ bool MyAvatar::cameraInsideHead(const glm::vec3& cameraPosition) const {
|
||||||
|
|
||||||
bool MyAvatar::shouldRenderHead(const RenderArgs* renderArgs) const {
|
bool MyAvatar::shouldRenderHead(const RenderArgs* renderArgs) const {
|
||||||
bool defaultMode = renderArgs->_renderMode == RenderArgs::DEFAULT_RENDER_MODE;
|
bool defaultMode = renderArgs->_renderMode == RenderArgs::DEFAULT_RENDER_MODE;
|
||||||
bool firstPerson = qApp->getCamera().getMode() == CAMERA_MODE_FIRST_PERSON;
|
bool firstPerson = qApp->getCamera().getMode() == CAMERA_MODE_FIRST_PERSON_LOOK_AT ||
|
||||||
|
qApp->getCamera().getMode() == CAMERA_MODE_FIRST_PERSON;
|
||||||
bool overrideAnim = _skeletonModel ? _skeletonModel->getRig().isPlayingOverrideAnimation() : false;
|
bool overrideAnim = _skeletonModel ? _skeletonModel->getRig().isPlayingOverrideAnimation() : false;
|
||||||
bool insideHead = cameraInsideHead(renderArgs->getViewFrustum().getPosition());
|
bool insideHead = cameraInsideHead(renderArgs->getViewFrustum().getPosition());
|
||||||
return !defaultMode || (!firstPerson && !insideHead) || (overrideAnim && !insideHead);
|
return !defaultMode || (!firstPerson && !insideHead) || (overrideAnim && !insideHead);
|
||||||
|
@ -3444,8 +3446,8 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
||||||
float targetSpeed = getDriveKey(YAW) * _yawSpeed;
|
float targetSpeed = getDriveKey(YAW) * _yawSpeed;
|
||||||
CameraMode mode = qApp->getCamera().getMode();
|
CameraMode mode = qApp->getCamera().getMode();
|
||||||
bool computeLookAt = isReadyForPhysics() && !qApp->isHMDMode() &&
|
bool computeLookAt = isReadyForPhysics() && !qApp->isHMDMode() &&
|
||||||
(mode == CAMERA_MODE_FIRST_PERSON || mode == CAMERA_MODE_LOOK_AT || mode == CAMERA_MODE_SELFIE);
|
(mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT || mode == CAMERA_MODE_LOOK_AT || mode == CAMERA_MODE_SELFIE);
|
||||||
bool smoothCameraYaw = computeLookAt && mode != CAMERA_MODE_FIRST_PERSON;
|
bool smoothCameraYaw = computeLookAt && mode != CAMERA_MODE_FIRST_PERSON_LOOK_AT;
|
||||||
if (smoothCameraYaw) {
|
if (smoothCameraYaw) {
|
||||||
// For "Look At" and "Selfie" camera modes we also smooth the yaw rotation from right-click mouse movement.
|
// For "Look At" and "Selfie" camera modes we also smooth the yaw rotation from right-click mouse movement.
|
||||||
float speedFromDeltaYaw = deltaTime > FLT_EPSILON ? getDriveKey(DELTA_YAW) / deltaTime : 0.0f;
|
float speedFromDeltaYaw = deltaTime > FLT_EPSILON ? getDriveKey(DELTA_YAW) / deltaTime : 0.0f;
|
||||||
|
@ -3569,11 +3571,11 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
||||||
if (isMovingFwdBwd) {
|
if (isMovingFwdBwd) {
|
||||||
if (isMovingSideways) {
|
if (isMovingSideways) {
|
||||||
// Reorient avatar to face camera diagonal
|
// Reorient avatar to face camera diagonal
|
||||||
blend = mode == CAMERA_MODE_FIRST_PERSON ? 1.0f : DIAGONAL_TURN_BLEND;
|
blend = mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT ? 1.0f : DIAGONAL_TURN_BLEND;
|
||||||
float turnSign = getDriveKey(TRANSLATE_Z) < 0.0f ? -1.0f : 1.0f;
|
float turnSign = getDriveKey(TRANSLATE_Z) < 0.0f ? -1.0f : 1.0f;
|
||||||
turnSign = getDriveKey(TRANSLATE_X) > 0.0f ? -turnSign : turnSign;
|
turnSign = getDriveKey(TRANSLATE_X) > 0.0f ? -turnSign : turnSign;
|
||||||
faceRotation = _lookAtYaw * glm::angleAxis(turnSign * 0.25f * PI, Vectors::UP);
|
faceRotation = _lookAtYaw * glm::angleAxis(turnSign * 0.25f * PI, Vectors::UP);
|
||||||
} else if (mode == CAMERA_MODE_FIRST_PERSON) {
|
} else if (mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT) {
|
||||||
blend = 1.0f;
|
blend = 1.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3644,11 +3646,11 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
||||||
glm::vec3 ajustedYawVector = cameraYawVector;
|
glm::vec3 ajustedYawVector = cameraYawVector;
|
||||||
float limitAngle = 0.0f;
|
float limitAngle = 0.0f;
|
||||||
float triggerAngle = -glm::sin(glm::radians(TRIGGER_REORIENT_ANGLE));
|
float triggerAngle = -glm::sin(glm::radians(TRIGGER_REORIENT_ANGLE));
|
||||||
if (mode == CAMERA_MODE_FIRST_PERSON) {
|
if (mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT) {
|
||||||
limitAngle = glm::sin(glm::radians(90.0f - FIRST_PERSON_TRIGGER_REORIENT_ANGLE));
|
limitAngle = glm::sin(glm::radians(90.0f - FIRST_PERSON_TRIGGER_REORIENT_ANGLE));
|
||||||
triggerAngle = limitAngle;
|
triggerAngle = limitAngle;
|
||||||
}
|
}
|
||||||
float reorientAngle = mode == CAMERA_MODE_FIRST_PERSON ? FIRST_PERSON_REORIENT_ANGLE : DEFAULT_REORIENT_ANGLE;
|
float reorientAngle = mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT ? FIRST_PERSON_REORIENT_ANGLE : DEFAULT_REORIENT_ANGLE;
|
||||||
if (frontBackDot < limitAngle) {
|
if (frontBackDot < limitAngle) {
|
||||||
if (frontBackDot < 0.0f) {
|
if (frontBackDot < 0.0f) {
|
||||||
ajustedYawVector = (leftRightDot < 0.0f ? -avatarVectorRight : avatarVectorRight);
|
ajustedYawVector = (leftRightDot < 0.0f ? -avatarVectorRight : avatarVectorRight);
|
||||||
|
@ -3684,7 +3686,7 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
||||||
}
|
}
|
||||||
_headLookAtActive = true;
|
_headLookAtActive = true;
|
||||||
const float FIRST_PERSON_RECENTER_SECONDS = 15.0f;
|
const float FIRST_PERSON_RECENTER_SECONDS = 15.0f;
|
||||||
if (mode == CAMERA_MODE_FIRST_PERSON) {
|
if (mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT) {
|
||||||
if (getDriveKey(YAW) + getDriveKey(STEP_YAW) + getDriveKey(DELTA_YAW) == 0.0f) {
|
if (getDriveKey(YAW) + getDriveKey(STEP_YAW) + getDriveKey(DELTA_YAW) == 0.0f) {
|
||||||
if (_firstPersonSteadyHeadTimer < FIRST_PERSON_RECENTER_SECONDS) {
|
if (_firstPersonSteadyHeadTimer < FIRST_PERSON_RECENTER_SECONDS) {
|
||||||
if (_firstPersonSteadyHeadTimer > 0.0f) {
|
if (_firstPersonSteadyHeadTimer > 0.0f) {
|
||||||
|
@ -3772,7 +3774,7 @@ glm::vec3 MyAvatar::scaleMotorSpeed(const glm::vec3 forward, const glm::vec3 rig
|
||||||
// Desktop mode.
|
// Desktop mode.
|
||||||
direction = (zSpeed * forward) + (xSpeed * right);
|
direction = (zSpeed * forward) + (xSpeed * right);
|
||||||
CameraMode mode = qApp->getCamera().getMode();
|
CameraMode mode = qApp->getCamera().getMode();
|
||||||
if ((mode == CAMERA_MODE_LOOK_AT || mode == CAMERA_MODE_FIRST_PERSON || mode == CAMERA_MODE_SELFIE) &&
|
if ((mode == CAMERA_MODE_LOOK_AT || mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT || mode == CAMERA_MODE_SELFIE) &&
|
||||||
zSpeed != 0.0f && xSpeed != 0.0f && !isFlying()){
|
zSpeed != 0.0f && xSpeed != 0.0f && !isFlying()){
|
||||||
direction = (zSpeed * forward);
|
direction = (zSpeed * forward);
|
||||||
}
|
}
|
||||||
|
@ -5437,7 +5439,7 @@ glm::quat MyAvatar::getOrientationForAudio() {
|
||||||
case AudioListenerMode::FROM_HEAD: {
|
case AudioListenerMode::FROM_HEAD: {
|
||||||
// Using the camera's orientation instead, when the current mode is controlling the avatar's head.
|
// Using the camera's orientation instead, when the current mode is controlling the avatar's head.
|
||||||
CameraMode mode = qApp->getCamera().getMode();
|
CameraMode mode = qApp->getCamera().getMode();
|
||||||
bool headFollowsCamera = mode == CAMERA_MODE_FIRST_PERSON || mode == CAMERA_MODE_LOOK_AT || mode == CAMERA_MODE_SELFIE;
|
bool headFollowsCamera = mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT || mode == CAMERA_MODE_LOOK_AT || mode == CAMERA_MODE_SELFIE;
|
||||||
result = headFollowsCamera ? qApp->getCamera().getOrientation() : getHead()->getFinalOrientationInWorldFrame();
|
result = headFollowsCamera ? qApp->getCamera().getOrientation() : getHead()->getFinalOrientationInWorldFrame();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -854,7 +854,8 @@ void Avatar::render(RenderArgs* renderArgs) {
|
||||||
float distanceToTarget = glm::length(toTarget);
|
float distanceToTarget = glm::length(toTarget);
|
||||||
const float DISPLAYNAME_DISTANCE = 20.0f;
|
const float DISPLAYNAME_DISTANCE = 20.0f;
|
||||||
updateDisplayNameAlpha(distanceToTarget < DISPLAYNAME_DISTANCE);
|
updateDisplayNameAlpha(distanceToTarget < DISPLAYNAME_DISTANCE);
|
||||||
if (!isMyAvatar() || renderArgs->_cameraMode != (int8_t)CAMERA_MODE_FIRST_PERSON) {
|
if (!isMyAvatar() || !(renderArgs->_cameraMode == (int8_t)CAMERA_MODE_FIRST_PERSON_LOOK_AT
|
||||||
|
|| renderArgs->_cameraMode == (int8_t)CAMERA_MODE_FIRST_PERSON)) {
|
||||||
auto& frustum = renderArgs->getViewFrustum();
|
auto& frustum = renderArgs->getViewFrustum();
|
||||||
auto textPosition = getDisplayNamePosition();
|
auto textPosition = getDisplayNamePosition();
|
||||||
if (frustum.pointIntersectsFrustum(textPosition)) {
|
if (frustum.pointIntersectsFrustum(textPosition)) {
|
||||||
|
|
|
@ -25,8 +25,14 @@
|
||||||
* <tr>
|
* <tr>
|
||||||
* <td><strong>First Person</strong></td>
|
* <td><strong>First Person</strong></td>
|
||||||
* <td><code>"first person"</code></td>
|
* <td><code>"first person"</code></td>
|
||||||
* <td>The camera is positioned such that you have the same view as your avatar. The camera moves and rotates with your
|
* <td>Legacy first person camera mode. The camera is positioned such that you have the same view as your avatar.
|
||||||
* avatar.</td>
|
* The camera moves and rotates with your avatar.</td>
|
||||||
|
* </tr>
|
||||||
|
* <tr>
|
||||||
|
* <td><strong>First Person Look At</strong></td>
|
||||||
|
* <td><code>"first person look at"</code></td>
|
||||||
|
* <td>Default first person camera mode. The camera is positioned such that you have the same view as your avatar.
|
||||||
|
* The camera moves and rotates with your avatar's head.</td>
|
||||||
* </tr>
|
* </tr>
|
||||||
* <tr>
|
* <tr>
|
||||||
* <td><strong>Third Person</strong></td>
|
* <td><strong>Third Person</strong></td>
|
||||||
|
@ -73,6 +79,8 @@ CameraMode stringToMode(const QString& mode) {
|
||||||
return CAMERA_MODE_THIRD_PERSON;
|
return CAMERA_MODE_THIRD_PERSON;
|
||||||
} else if (mode == "first person") {
|
} else if (mode == "first person") {
|
||||||
return CAMERA_MODE_FIRST_PERSON;
|
return CAMERA_MODE_FIRST_PERSON;
|
||||||
|
} else if (mode == "first person look at") {
|
||||||
|
return CAMERA_MODE_FIRST_PERSON_LOOK_AT;
|
||||||
} else if (mode == "mirror") {
|
} else if (mode == "mirror") {
|
||||||
return CAMERA_MODE_MIRROR;
|
return CAMERA_MODE_MIRROR;
|
||||||
} else if (mode == "independent") {
|
} else if (mode == "independent") {
|
||||||
|
@ -92,6 +100,8 @@ QString modeToString(CameraMode mode) {
|
||||||
return "third person";
|
return "third person";
|
||||||
} else if (mode == CAMERA_MODE_FIRST_PERSON) {
|
} else if (mode == CAMERA_MODE_FIRST_PERSON) {
|
||||||
return "first person";
|
return "first person";
|
||||||
|
} else if (mode == CAMERA_MODE_FIRST_PERSON_LOOK_AT) {
|
||||||
|
return "first person look at";
|
||||||
} else if (mode == CAMERA_MODE_MIRROR) {
|
} else if (mode == CAMERA_MODE_MIRROR) {
|
||||||
return "mirror";
|
return "mirror";
|
||||||
} else if (mode == CAMERA_MODE_INDEPENDENT) {
|
} else if (mode == CAMERA_MODE_INDEPENDENT) {
|
||||||
|
|
|
@ -19,6 +19,7 @@ enum CameraMode
|
||||||
{
|
{
|
||||||
CAMERA_MODE_NULL = -1,
|
CAMERA_MODE_NULL = -1,
|
||||||
CAMERA_MODE_THIRD_PERSON,
|
CAMERA_MODE_THIRD_PERSON,
|
||||||
|
CAMERA_MODE_FIRST_PERSON_LOOK_AT,
|
||||||
CAMERA_MODE_FIRST_PERSON,
|
CAMERA_MODE_FIRST_PERSON,
|
||||||
CAMERA_MODE_MIRROR,
|
CAMERA_MODE_MIRROR,
|
||||||
CAMERA_MODE_INDEPENDENT,
|
CAMERA_MODE_INDEPENDENT,
|
||||||
|
|
|
@ -663,7 +663,7 @@ function handleSecondLaunchWindowVisibleChanged(shouldBeVisible) {
|
||||||
|
|
||||||
function onDisplayModeChanged(isHMDMode) {
|
function onDisplayModeChanged(isHMDMode) {
|
||||||
if (isHMDMode) {
|
if (isHMDMode) {
|
||||||
Camera.setModeString("first person");
|
Camera.setModeString("first person look at");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isHMDMode) {
|
if (isHMDMode) {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
// Automatically enter first person mode when entering HMD mode
|
// Automatically enter first person mode when entering HMD mode
|
||||||
HMD.displayModeChanged.connect(function(isHMDMode) {
|
HMD.displayModeChanged.connect(function(isHMDMode) {
|
||||||
if (isHMDMode) {
|
if (isHMDMode) {
|
||||||
Camera.setModeString("first person");
|
Camera.setModeString("first person look at");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -272,7 +272,7 @@
|
||||||
currentProgress = 0.0;
|
currentProgress = 0.0;
|
||||||
connectionToDomainFailed = false;
|
connectionToDomainFailed = false;
|
||||||
previousCameraMode = Camera.mode;
|
previousCameraMode = Camera.mode;
|
||||||
Camera.mode = "first person";
|
Camera.mode = "first person look at";
|
||||||
updateProgressBar(0.0);
|
updateProgressBar(0.0);
|
||||||
scaleInterstitialPage(MyAvatar.sensorToWorldScale);
|
scaleInterstitialPage(MyAvatar.sensorToWorldScale);
|
||||||
timer = Script.setTimeout(update, 2000);
|
timer = Script.setTimeout(update, 2000);
|
||||||
|
|
|
@ -52,8 +52,8 @@ function calcSpawnInfo(hand, landscape) {
|
||||||
|
|
||||||
var LEFT_HAND = Controller.Standard.LeftHand;
|
var LEFT_HAND = Controller.Standard.LeftHand;
|
||||||
var sensorToWorldScale = MyAvatar.sensorToWorldScale;
|
var sensorToWorldScale = MyAvatar.sensorToWorldScale;
|
||||||
var headPos = (HMD.active && Camera.mode === "first person") ? HMD.position : Camera.position;
|
var headPos = (HMD.active && (Camera.mode === "first person" || Camera.mode === "first person look at")) ? HMD.position : Camera.position;
|
||||||
var headRot = Quat.cancelOutRollAndPitch((HMD.active && Camera.mode === "first person") ?
|
var headRot = Quat.cancelOutRollAndPitch((HMD.active && (Camera.mode === "first person" || Camera.mode === "first person look at")) ?
|
||||||
HMD.orientation : Camera.orientation);
|
HMD.orientation : Camera.orientation);
|
||||||
|
|
||||||
var right = Quat.getRight(headRot);
|
var right = Quat.getRight(headRot);
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
function handJointName(hand) {
|
function handJointName(hand) {
|
||||||
var jointName;
|
var jointName;
|
||||||
if (hand === LEFT_HAND) {
|
if (hand === LEFT_HAND) {
|
||||||
if (Camera.mode === "first person") {
|
if (Camera.mode === "first person" || Camera.mode === "first person look at") {
|
||||||
jointName = "_CONTROLLER_LEFTHAND";
|
jointName = "_CONTROLLER_LEFTHAND";
|
||||||
} else if (Camera.mode === "third person") {
|
} else if (Camera.mode === "third person") {
|
||||||
jointName = "_CAMERA_RELATIVE_CONTROLLER_LEFTHAND";
|
jointName = "_CAMERA_RELATIVE_CONTROLLER_LEFTHAND";
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
jointName = "LeftHand";
|
jointName = "LeftHand";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Camera.mode === "first person") {
|
if (Camera.mode === "first person" || Camera.mode === "first person look at") {
|
||||||
jointName = "_CONTROLLER_RIGHTHAND";
|
jointName = "_CONTROLLER_RIGHTHAND";
|
||||||
} else if (Camera.mode === "third person") {
|
} else if (Camera.mode === "third person") {
|
||||||
jointName = "_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND";
|
jointName = "_CAMERA_RELATIVE_CONTROLLER_RIGHTHAND";
|
||||||
|
|
Loading…
Reference in a new issue