fix a camera problem and increase player speed

actorid
gugus 14 years ago
parent 91ea36509d
commit 3dddcbd958

@ -109,13 +109,13 @@ void MWScene::doPhysics (float duration, MWWorld::World& world,
Ogre::Quaternion yawQuat = yawNode->getOrientation();
Ogre::Quaternion pitchQuat = pitchNode->getOrientation();
Ogre::Vector3 dir1(iter->second.x,iter->second.z,-iter->second.y);
dir = 0.01*(yawQuat*pitchQuat*dir1);
dir = 0.07*(yawQuat*pitchQuat*dir1);
}
else
{
Ogre::Quaternion quat = yawNode->getOrientation();
Ogre::Vector3 dir1(iter->second.x,iter->second.z,-iter->second.y);
dir = 0.01*(quat*dir1);
dir = 0.07*(quat*dir1);
}
//set the walk direction
@ -127,6 +127,7 @@ void MWScene::doPhysics (float duration, MWWorld::World& world,
{
OEngine::Physic::PhysicActor* act = it->second;
btVector3 newPos = act->getPosition();
std::cout << newPos.x()<<newPos.y(),newPos.z();
MWWorld::Ptr ptr = world.getPtrViaHandle (it->first);
world.moveObject (ptr, newPos.x(), newPos.y(), newPos.z());
}

@ -309,7 +309,7 @@ namespace MWWorld
bool adjustPlayerPos)
{
if (adjustPlayerPos)
mPlayer->setPos (position.pos[0], position.pos[1], position.pos[2], true);
mPlayer->setPos (position.pos[0], position.pos[1], position.pos[2], false);
mPlayer->setCell (cell);
// TODO orientation

Loading…
Cancel
Save