mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Set the object node scale before inserting model
This fixes initWorldSpaceParticles not taking object scale into account. Still not taking into account object rotation or node animations. Ideally the initWorldSpaceParticles needs to run in an updateCallback.
This commit is contained in:
parent
9b96fcc224
commit
8c268f239e
1 changed files with 5 additions and 0 deletions
|
@ -125,6 +125,11 @@ void Objects::insertBegin(const MWWorld::Ptr& ptr)
|
|||
|
||||
insert->setPosition(osg::Vec3(f[0], f[1], f[2]));
|
||||
|
||||
const float scale = ptr.getCellRef().getScale();
|
||||
osg::Vec3f scaleVec(scale, scale, scale);
|
||||
ptr.getClass().adjustScale(ptr, scaleVec, true);
|
||||
insert->setScale(scaleVec);
|
||||
|
||||
ptr.getRefData().setBaseNode(insert);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue