Merge branch 'pageswithattitude' into 'master'

Apply rotation when computing the bounding box of a paged reference

See merge request OpenMW/openmw!4447
pull/3236/head
psi29a 2 months ago
commit f5c457c474

@ -1687,6 +1687,10 @@ namespace MWRender
const float refScale = ptr.getCellRef().getScale();
rootNode->setScale({ refScale, refScale, refScale });
const auto& rotation = ptr.getCellRef().getPosition().rot;
if (!ptr.getClass().isActor())
rootNode->setAttitude(osg::Quat(rotation[0], osg::Vec3(-1, 0, 0))
* osg::Quat(rotation[1], osg::Vec3(0, -1, 0)) * osg::Quat(rotation[2], osg::Vec3(0, 0, -1)));
rootNode->setPosition(ptr.getCellRef().getPosition().asVec3());
osg::ref_ptr<Animation> animation = nullptr;

Loading…
Cancel
Save