Animation with physics attempt

actorid
Jason Hooks 13 years ago
parent 45c57721ff
commit c2fa82326d

@ -411,10 +411,7 @@ namespace MWRender{
if(bQuats)
bone->setOrientation(r);
if(iter == transformations->begin()){
trans = bone->getPosition();
rotate = bone->getOrientation();
}
skel->getManualBonesDirty();
skel->_updateTransforms();
skel->_notifyManualBonesDirty();

@ -20,8 +20,9 @@ class Animation{
OEngine::Render::OgreRenderer &mRend;
MWWorld::Environment& mEnvironment;
static std::map<std::string, int> mUniqueIDs;
Ogre::Quaternion rotate;
Ogre::Vector3 trans;
Ogre::Vector3 originalpos;
Ogre::Vector3 originalscenenode;
std::vector<std::vector<Nif::NiTriShapeCopy>* > shapeparts; //All the NiTriShape data that we need for animating an npc
float time;

@ -214,6 +214,8 @@ NpcAnimation::NpcAnimation(const MWWorld::Ptr& ptr, MWWorld::Environment& _env,O
insertFreePart("meshes\\" + feet->model,"><", insert);
insertFreePart("meshes\\" + feet->model,">:", insert);
}
originalpos = insert->_getWorldAABB().getCenter();
originalscenenode = insert->getPosition();
}
Ogre::Entity* NpcAnimation::insertBoundedPart(const std::string &mesh, std::string bonename){
@ -259,7 +261,13 @@ void NpcAnimation::runAnimation(float timepassed){
}
handleAnimationTransforms();
//mEnvironment.mWorld->
Ogre::Vector3 current = insert->_getWorldAABB().getCenter();
//This is the attempt at npc physics
//mEnvironment.mWorld->setObjectPhysicsPosition(insert->getName(), current);
/*if(base->hasSkeleton())
{

Loading…
Cancel
Save