mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-08 09:37:53 +00:00
Fix orbit camera axis
This commit is contained in:
parent
e309dfd234
commit
b246580c63
@ -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 New Issue
Block a user