mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 23:57:13 +02:00
make Hand Input Mouse off by default
This commit is contained in:
parent
927cee81bf
commit
6e5847bb1c
4 changed files with 7 additions and 6 deletions
|
@ -2745,7 +2745,7 @@ void Application::update(float deltaTime) {
|
||||||
Hand* hand = DependencyManager::get<AvatarManager>()->getMyAvatar()->getHand();
|
Hand* hand = DependencyManager::get<AvatarManager>()->getMyAvatar()->getHand();
|
||||||
setPalmData(hand, leftHand, deltaTime, LEFT_HAND_INDEX, userInputMapper->getActionState(UserInputMapper::LEFT_HAND_CLICK));
|
setPalmData(hand, leftHand, deltaTime, LEFT_HAND_INDEX, userInputMapper->getActionState(UserInputMapper::LEFT_HAND_CLICK));
|
||||||
setPalmData(hand, rightHand, deltaTime, RIGHT_HAND_INDEX, userInputMapper->getActionState(UserInputMapper::RIGHT_HAND_CLICK));
|
setPalmData(hand, rightHand, deltaTime, RIGHT_HAND_INDEX, userInputMapper->getActionState(UserInputMapper::RIGHT_HAND_CLICK));
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::HandMouseInput)) {
|
if (Menu::getInstance()->isOptionChecked(MenuOption::EnableHandMouseInput)) {
|
||||||
emulateMouse(hand, userInputMapper->getActionState(UserInputMapper::LEFT_HAND_CLICK),
|
emulateMouse(hand, userInputMapper->getActionState(UserInputMapper::LEFT_HAND_CLICK),
|
||||||
userInputMapper->getActionState(UserInputMapper::SHIFT), LEFT_HAND_INDEX);
|
userInputMapper->getActionState(UserInputMapper::SHIFT), LEFT_HAND_INDEX);
|
||||||
emulateMouse(hand, userInputMapper->getActionState(UserInputMapper::RIGHT_HAND_CLICK),
|
emulateMouse(hand, userInputMapper->getActionState(UserInputMapper::RIGHT_HAND_CLICK),
|
||||||
|
|
|
@ -464,7 +464,7 @@ Menu::Menu() {
|
||||||
|
|
||||||
MenuWrapper* handOptionsMenu = developerMenu->addMenu("Hands");
|
MenuWrapper* handOptionsMenu = developerMenu->addMenu("Hands");
|
||||||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::DisplayHandTargets, 0, false);
|
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::DisplayHandTargets, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::HandMouseInput, 0, true);
|
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::EnableHandMouseInput, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::LowVelocityFilter, 0, true,
|
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::LowVelocityFilter, 0, true,
|
||||||
qApp, SLOT(setLowVelocityFilter(bool)));
|
qApp, SLOT(setLowVelocityFilter(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::ShowIKConstraints, 0, false);
|
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::ShowIKConstraints, 0, false);
|
||||||
|
|
|
@ -204,7 +204,7 @@ namespace MenuOption {
|
||||||
const QString FrameTimer = "Show Timer";
|
const QString FrameTimer = "Show Timer";
|
||||||
const QString FullscreenMirror = "Fullscreen Mirror";
|
const QString FullscreenMirror = "Fullscreen Mirror";
|
||||||
const QString GlowWhenSpeaking = "Glow When Speaking";
|
const QString GlowWhenSpeaking = "Glow When Speaking";
|
||||||
const QString HandMouseInput = "Enable Hand Mouse Input";
|
const QString EnableHandMouseInput = "Enable Hand Controller Mouse Input";
|
||||||
const QString IncreaseAvatarSize = "Increase Avatar Size";
|
const QString IncreaseAvatarSize = "Increase Avatar Size";
|
||||||
const QString IndependentMode = "Independent Mode";
|
const QString IndependentMode = "Independent Mode";
|
||||||
const QString InputMenu = "Avatar>Input Devices";
|
const QString InputMenu = "Avatar>Input Devices";
|
||||||
|
|
|
@ -313,8 +313,8 @@ void ApplicationCompositor::displayOverlayTextureHmd(RenderArgs* renderArgs, int
|
||||||
glm::mat4 overlayXfm;
|
glm::mat4 overlayXfm;
|
||||||
_modelTransform.getMatrix(overlayXfm);
|
_modelTransform.getMatrix(overlayXfm);
|
||||||
|
|
||||||
// Only render the hand pointers if the HandMouseInput is enabled
|
// Only render the hand pointers if the EnableHandMouseInput is enabled
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::HandMouseInput)) {
|
if (Menu::getInstance()->isOptionChecked(MenuOption::EnableHandMouseInput)) {
|
||||||
MyAvatar* myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar();
|
MyAvatar* myAvatar = DependencyManager::get<AvatarManager>()->getMyAvatar();
|
||||||
for (int i = 0; i < (int)myAvatar->getHand()->getNumPalms(); i++) {
|
for (int i = 0; i < (int)myAvatar->getHand()->getNumPalms(); i++) {
|
||||||
PalmData& palm = myAvatar->getHand()->getPalms()[i];
|
PalmData& palm = myAvatar->getHand()->getPalms()[i];
|
||||||
|
@ -435,7 +435,8 @@ void ApplicationCompositor::renderPointers(gpu::Batch& batch) {
|
||||||
_magActive[MOUSE] = _magnifier;
|
_magActive[MOUSE] = _magnifier;
|
||||||
_reticleActive[LEFT_CONTROLLER] = false;
|
_reticleActive[LEFT_CONTROLLER] = false;
|
||||||
_reticleActive[RIGHT_CONTROLLER] = false;
|
_reticleActive[RIGHT_CONTROLLER] = false;
|
||||||
} else if (qApp->getLastMouseMoveWasSimulated() && Menu::getInstance()->isOptionChecked(MenuOption::HandMouseInput)) {
|
} else if (qApp->getLastMouseMoveWasSimulated()
|
||||||
|
&& Menu::getInstance()->isOptionChecked(MenuOption::EnableHandMouseInput)) {
|
||||||
//only render controller pointer if we aren't already rendering a mouse pointer
|
//only render controller pointer if we aren't already rendering a mouse pointer
|
||||||
_reticleActive[MOUSE] = false;
|
_reticleActive[MOUSE] = false;
|
||||||
_magActive[MOUSE] = false;
|
_magActive[MOUSE] = false;
|
||||||
|
|
Loading…
Reference in a new issue