mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Better fix some scaling issues
This commit is contained in:
parent
535cd8360f
commit
18b7008409
@ -219,7 +219,7 @@ Ogre::Vector3 Animation::updatePosition(float time)
|
||||
posdiff = (mNonAccumRoot->getPosition() - mLastPosition) * mAccumulate;
|
||||
|
||||
/* Translate the accumulation root back to compensate for the move. */
|
||||
mAccumRoot->translate(-posdiff * mAccumRoot->_getDerivedScale());
|
||||
mAccumRoot->translate(-posdiff);
|
||||
mLastPosition += posdiff;
|
||||
}
|
||||
return posdiff;
|
||||
@ -243,7 +243,7 @@ void Animation::reset(const std::string &marker)
|
||||
if(mNonAccumRoot)
|
||||
{
|
||||
mLastPosition = mNonAccumRoot->getPosition();
|
||||
mAccumRoot->setPosition((mStartPosition - mLastPosition) * mAccumRoot->_getDerivedScale());
|
||||
mAccumRoot->setPosition(mStartPosition*mNonAccumRoot->_getDerivedScale() - mLastPosition);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,6 +83,11 @@ NpcAnimation::NpcAnimation(const MWWorld::Ptr& ptr, Ogre::SceneNode* node, MWWor
|
||||
MWBase::Environment::get().getWorld()->getStore();
|
||||
const ESM::Race *race = store.get<ESM::Race>().find(mNpc->mRace);
|
||||
|
||||
float scale = race->mData.mHeight.mMale;
|
||||
if(!mNpc->isMale())
|
||||
scale = race->mData.mHeight.mFemale;
|
||||
node->scale(Ogre::Vector3(scale));
|
||||
|
||||
mHeadModel = "meshes\\" + store.get<ESM::BodyPart>().find(mNpc->mHead)->mModel;
|
||||
mHairModel = "meshes\\" + store.get<ESM::BodyPart>().find(mNpc->mHair)->mModel;
|
||||
|
||||
@ -128,12 +133,6 @@ NpcAnimation::NpcAnimation(const MWWorld::Ptr& ptr, Ogre::SceneNode* node, MWWor
|
||||
if(mNpc->mModel.length() > 0)
|
||||
insertSkeletonSource("meshes\\"+Misc::StringUtils::lowerCase(mNpc->mModel));
|
||||
|
||||
float scale = race->mData.mHeight.mMale;
|
||||
if (!mNpc->isMale()) {
|
||||
scale = race->mData.mHeight.mFemale;
|
||||
}
|
||||
mInsert->scale(scale, scale, scale);
|
||||
|
||||
updateParts();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user