fix a camera problem and increase player speed

This commit is contained in:
gugus 2011-03-22 13:01:23 +01:00
parent 91ea36509d
commit 3dddcbd958
2 changed files with 4 additions and 3 deletions

View file

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

View file

@ -309,7 +309,7 @@ namespace MWWorld
bool adjustPlayerPos) bool adjustPlayerPos)
{ {
if (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); mPlayer->setCell (cell);
// TODO orientation // TODO orientation