mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
Fix Gcc/MSVC differences with friend class. Invert camera derived direction.
This commit is contained in:
parent
a21958d007
commit
1eed180a5c
@ -335,6 +335,7 @@ namespace CSVRender
|
||||
{
|
||||
CSMSettings::UserSettings &userSettings = CSMSettings::UserSettings::instance();
|
||||
QString coord = userSettings.setting("debug/mouse-reference", QString("screen"));
|
||||
Ogre::Vector3 derived = getCamera()->getDerivedDirection();
|
||||
|
||||
QString wheelDir = userSettings.setting("debug/mouse-wheel", QString("Closer/Further"));
|
||||
if(wheelDir == "Left/Right")
|
||||
@ -342,7 +343,7 @@ namespace CSVRender
|
||||
if(coord == "world")
|
||||
return std::make_pair(Ogre::Vector3::UNIT_Y, Ogre::Vector3::UNIT_X);
|
||||
else
|
||||
return std::make_pair(getCamera()->getDerivedRight(), getCamera()->getDerivedDirection());
|
||||
return std::make_pair(getCamera()->getDerivedRight(), Ogre::Vector3(-derived.x, -derived.y, -derived.z));
|
||||
}
|
||||
else if(wheelDir == "Up/Down")
|
||||
{
|
||||
@ -356,7 +357,7 @@ namespace CSVRender
|
||||
if(coord == "world")
|
||||
return std::make_pair(Ogre::Vector3::UNIT_X, Ogre::Vector3::UNIT_Y);
|
||||
else
|
||||
return std::make_pair(getCamera()->getDerivedDirection(), getCamera()->getDerivedRight());
|
||||
return std::make_pair(Ogre::Vector3(-derived.x, -derived.y, -derived.z), getCamera()->getDerivedRight());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "../world/physicsmanager.hpp"
|
||||
#include "../world/physicssystem.hpp"
|
||||
|
||||
#include "mousestate.hpp"
|
||||
#include "elements.hpp"
|
||||
|
||||
CSVRender::WorldspaceWidget::WorldspaceWidget (CSMDoc::Document& document, QWidget* parent)
|
||||
|
@ -2,6 +2,7 @@
|
||||
#define OPENCS_VIEW_WORLDSPACEWIDGET_H
|
||||
|
||||
#include "scenewidget.hpp"
|
||||
#include "mousestate.hpp"
|
||||
|
||||
#include "navigation1st.hpp"
|
||||
#include "navigationfree.hpp"
|
||||
|
Loading…
x
Reference in New Issue
Block a user