• Create Account

### #ActualMedo3337

Posted 30 November 2012 - 08:01 AM

Okay, guys I know I'm asking alot of questions, but I have alot alot of work to do to finish the 3D Game Engine I'm working on.

I have a RigidBody, I can rotate it by supplying a new Quaternion value, but here is the problem:

I want to rotate it SLOWLY, something like the following:
// We might need to call this method 500 times from rendering to make the RigidBody rotation is equal to FinalQuaternion

void RotateSlowly(btQuaternion FinalQuaternion)
{
btMatrix3x3 orn = body->getWorldTransform().getBasis();
// Code here to change 'orn' according to FinalQuaternion to keep rotating with certain speed until orn rotation is EQUAL to FinalQuaternion
body->getWorldTransform().setBasis(orn);
}


How can I do that?

### #2Medo3337

Posted 30 November 2012 - 08:00 AM

Okay, guys I know I'm asking alot of questions, but I have alot alot of work to do to finish the 3D Game Engine I'm working on.

I have a RigidBody, I can rotate it by supplying a new Quaternion value, but here is the problem:

I want to rotate it SLOWLY, something like the following:
// We might need to call this method 500 times from rendering to make the RigidBody rotation is equal to FinalQuaternion

void RotateSlowly(btQuaternion FinalQuaternion)
{
btMatrix3x3 orn = body->getWorldTransform().getBasis();
// Code here to change 'orn' according to FinalQuaternion to keep rotating until orn rotation is EQUAL to FinalQuaternion
body->getWorldTransform().setBasis(orn);
}


How can I do that?

### #1Medo3337

Posted 30 November 2012 - 07:57 AM

Okay, I have a RigidBody, I can rotate it by supplying a new Quaternion value, but here is the problem:

I want to rotate it SLOWLY, something like the following:
// We might need to call this method 500 times from rendering to make the RigidBody rotation is equal to FinalQuaternion

void RotateSlowly(btQuaternion FinalQuaternion)
{
btMatrix3x3 orn = body->getWorldTransform().getBasis();
// Code here to change 'orn' according to FinalQuaternion to keep rotating until orn rotation is EQUAL to FinalQuaternion
body->getWorldTransform().setBasis(orn);
}


How can I do that?

PARTNERS