Skip to content

Commit f5c457c

Browse files
committed
Merge branch 'pageswithattitude' into 'master'
Apply rotation when computing the bounding box of a paged reference See merge request OpenMW/openmw!4447
2 parents 32a6ed6 + 79bd630 commit f5c457c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/openmw/mwrender/renderingmanager.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1687,6 +1687,10 @@ namespace MWRender
16871687

16881688
const float refScale = ptr.getCellRef().getScale();
16891689
rootNode->setScale({ refScale, refScale, refScale });
1690+
const auto& rotation = ptr.getCellRef().getPosition().rot;
1691+
if (!ptr.getClass().isActor())
1692+
rootNode->setAttitude(osg::Quat(rotation[0], osg::Vec3(-1, 0, 0))
1693+
* osg::Quat(rotation[1], osg::Vec3(0, -1, 0)) * osg::Quat(rotation[2], osg::Vec3(0, 0, -1)));
16901694
rootNode->setPosition(ptr.getCellRef().getPosition().asVec3());
16911695

16921696
osg::ref_ptr<Animation> animation = nullptr;

0 commit comments

Comments
 (0)