Merge branch 'GamePhysics' of https://github.com/dean11/Danbias into GameLogic
This commit is contained in:
commit
b883e2de39
|
@ -184,7 +184,7 @@ void API_Impl::UpdateWorld()
|
||||||
simpleBody->GetMotionState()->getWorldTransform(trans);
|
simpleBody->GetMotionState()->getWorldTransform(trans);
|
||||||
this->customBodies[i]->SetPosition(Float3(trans.getOrigin().x(), trans.getOrigin().y(), trans.getOrigin().z()));
|
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()));
|
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)
|
if(simpleBody->GetRigidBody()->getActivationState() == ACTIVE_TAG)
|
||||||
{
|
{
|
||||||
simpleBody->CallSubscription_Move();
|
simpleBody->CallSubscription_Move();
|
||||||
|
|
|
@ -149,9 +149,9 @@ void SimpleRigidBody::SetUpAndRight(::Oyster::Math::Float3 up, ::Oyster::Math::F
|
||||||
rotation[0] = rightVector.normalized();
|
rotation[0] = rightVector.normalized();
|
||||||
rotation[2] = rightVector.cross(upVector).normalized();
|
rotation[2] = rightVector.cross(upVector).normalized();
|
||||||
|
|
||||||
this->motionState->getWorldTransform(trans);
|
trans = this->rigidBody->getWorldTransform();
|
||||||
trans.setBasis(rotation);
|
trans.setBasis(rotation);
|
||||||
this->motionState->setWorldTransform(trans);
|
this->rigidBody->setWorldTransform(trans);
|
||||||
|
|
||||||
btQuaternion quaternion;
|
btQuaternion quaternion;
|
||||||
quaternion = trans.getRotation();
|
quaternion = trans.getRotation();
|
||||||
|
@ -168,9 +168,9 @@ void SimpleRigidBody::SetUpAndForward(::Oyster::Math::Float3 up, ::Oyster::Math:
|
||||||
rotation[2] = forwardVector.normalized();
|
rotation[2] = forwardVector.normalized();
|
||||||
rotation[0] = forwardVector.cross(upVector).normalized();
|
rotation[0] = forwardVector.cross(upVector).normalized();
|
||||||
|
|
||||||
this->motionState->getWorldTransform(trans);
|
trans = this->rigidBody->getWorldTransform();
|
||||||
trans.setBasis(rotation);
|
trans.setBasis(rotation);
|
||||||
this->motionState->setWorldTransform(trans);
|
this->rigidBody->setWorldTransform(trans);
|
||||||
|
|
||||||
btQuaternion quaternion;
|
btQuaternion quaternion;
|
||||||
quaternion = trans.getRotation();
|
quaternion = trans.getRotation();
|
||||||
|
|
Loading…
Reference in New Issue