Fixed up functions again

This commit is contained in:
Robin Engman 2014-02-11 11:45:16 +01:00
parent ee1dc530fa
commit b5631457d3
2 changed files with 5 additions and 5 deletions

View File

@ -184,7 +184,7 @@ void API_Impl::UpdateWorld()
simpleBody->GetMotionState()->getWorldTransform(trans);
this->customBodies[i]->SetPosition(Float3(trans.getOrigin().x(), trans.getOrigin().y(), trans.getOrigin().z()));
this->customBodies[i]->SetRotation(Quaternion(Float3(trans.getRotation().x(), trans.getRotation().y(), trans.getRotation().z()), trans.getRotation().w()));
//simpleBody->SetUpAndRight(Float3(0,1,0), Float3(-1,0,0));
if(simpleBody->GetRigidBody()->getActivationState() == ACTIVE_TAG)
{
simpleBody->CallSubscription_Move();

View File

@ -149,9 +149,9 @@ void SimpleRigidBody::SetUpAndRight(::Oyster::Math::Float3 up, ::Oyster::Math::F
rotation[0] = rightVector.normalized();
rotation[2] = rightVector.cross(upVector).normalized();
this->motionState->getWorldTransform(trans);
trans = this->rigidBody->getWorldTransform();
trans.setBasis(rotation);
this->motionState->setWorldTransform(trans);
this->rigidBody->setWorldTransform(trans);
btQuaternion quaternion;
quaternion = trans.getRotation();
@ -168,9 +168,9 @@ void SimpleRigidBody::SetUpAndForward(::Oyster::Math::Float3 up, ::Oyster::Math:
rotation[2] = forwardVector.normalized();
rotation[0] = forwardVector.cross(upVector).normalized();
this->motionState->getWorldTransform(trans);
trans = this->rigidBody->getWorldTransform();
trans.setBasis(rotation);
this->motionState->setWorldTransform(trans);
this->rigidBody->setWorldTransform(trans);
btQuaternion quaternion;
quaternion = trans.getRotation();