mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Voxel click to fly is now an option in the Tools Menu
This commit is contained in:
parent
d4fc85b197
commit
f3b6e21a6d
3 changed files with 6 additions and 1 deletions
|
@ -1132,7 +1132,8 @@ void Application::mousePressEvent(QMouseEvent* event) {
|
|||
glm::vec3 myPosition = _myAvatar.getPosition();
|
||||
|
||||
// If there is not an action tool set (add, delete, color), move to this voxel
|
||||
if (!(Menu::getInstance()->isOptionChecked(MenuOption::VoxelAddMode) ||
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::ClickToFly) &&
|
||||
!(Menu::getInstance()->isOptionChecked(MenuOption::VoxelAddMode) ||
|
||||
Menu::getInstance()->isOptionChecked(MenuOption::VoxelDeleteMode) ||
|
||||
Menu::getInstance()->isOptionChecked(MenuOption::VoxelColorMode))) {
|
||||
_myAvatar.setMoveTarget(myPosition + (newTarget - myPosition) * PERCENTAGE_TO_MOVE_TOWARD);
|
||||
|
|
|
@ -170,6 +170,9 @@ Menu::Menu() :
|
|||
QAction* getColorMode = addCheckableActionToQMenuAndActionHash(toolsMenu, MenuOption::VoxelGetColorMode, Qt::Key_G);
|
||||
_voxelModeActionsGroup->addAction(getColorMode);
|
||||
|
||||
addCheckableActionToQMenuAndActionHash(toolsMenu, MenuOption::ClickToFly);
|
||||
|
||||
|
||||
// connect each of the voxel mode actions to the updateVoxelModeActionsSlot
|
||||
foreach (QAction* action, _voxelModeActionsGroup->actions()) {
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(updateVoxelModeActions()));
|
||||
|
|
|
@ -208,6 +208,7 @@ namespace MenuOption {
|
|||
const QString OffAxisProjection = "Off-Axis Projection";
|
||||
const QString OldVoxelCullingMode = "Old Voxel Culling Mode";
|
||||
const QString TurnWithHead = "Turn using Head";
|
||||
const QString ClickToFly = "Fly to voxel on click";
|
||||
const QString Oscilloscope = "Audio Oscilloscope";
|
||||
const QString Pair = "Pair";
|
||||
const QString PasteVoxels = "Paste";
|
||||
|
|
Loading…
Reference in a new issue