I have gotten Bullet to work successfully with Ogre in a simple test. I have the ground setup as a 'flat' cube and a cube that will be the 'player' on that ground. I have been able to move/slide the object in the standard 4 directions on the plain (North, South, East, West) without a problem using setLinearVelocity().
The problem I run into is when I want to orient the cube to the direction it is moving. As soon as I change its orientation the cube bounces into the air. Following is basically what I am doing:
Code: Select all
myQuat = obj->getWorldTransform();
myQuat.setRotation(yaw, pitch=0, roll=0);
//depending on direction yaw is set to 0, PI, -PI/2 or PI/2
obj->setWorldTransform(myQuat);
First off this bounce doesn't make sense as the object is only spinning to face a different direction. Second, is there a clean way to prevent the bounce or is it best to follow the 'character demo' and implement my own collision response?
Thanks