mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 13:09:40 +00:00
Fix orbit camera axis
This commit is contained in:
parent
e309dfd234
commit
b246580c63
1 changed files with 1 additions and 5 deletions
|
@ -697,11 +697,7 @@ namespace CSVRender
|
||||||
osg::Vec3d absoluteUp = osg::Vec3(0,0,1);
|
osg::Vec3d absoluteUp = osg::Vec3(0,0,1);
|
||||||
|
|
||||||
osg::Vec3d forward = center - eye;
|
osg::Vec3d forward = center - eye;
|
||||||
|
osg::Vec3d axis = up ^ forward;
|
||||||
osg::Vec3d axis = absoluteUp ^ forward;
|
|
||||||
|
|
||||||
if (mConstRoll && up.z() < 0.0)
|
|
||||||
axis *= -1.0;
|
|
||||||
|
|
||||||
osg::Quat rotation = osg::Quat(value,axis);
|
osg::Quat rotation = osg::Quat(value,axis);
|
||||||
osg::Vec3d oldOffset = eye - mCenter;
|
osg::Vec3d oldOffset = eye - mCenter;
|
||||||
|
|
Loading…
Reference in a new issue