Issue with Bullet character controll

saneeshnair
Posts: 11
Joined: Thu Apr 07, 2011 5:59 am

Issue with Bullet character controll

Post by saneeshnair »

Hi All,

I have a Z up rendering engine where I initialized gravity using

Code: Select all

m_dynamicsWorld->setGravity(btVector3(0,0,-10));
I implemented a vehicle control easily there. Now I want to try the Kinematic character controller of bullet. I integrated the character controller with rendering engine. But as soon as the rendering starts my character automatically moves in the Y direction and has no effect of the gravity in the Z-direction while other bodies are affected by gravity. Does anybody has any idea about this.

Many Thanks,
Saneesh
saneeshnair
Posts: 11
Joined: Thu Apr 07, 2011 5:59 am

Re: Issue with Bullet character controll

Post by saneeshnair »

Is there a setting in the Bullet character controller so that we can change its gravity direction. I tried changing gravity of the bullet character demo to Z

Code: Select all

m_dynamicsWorld->setGravity(btVector3(0,0,-10));
Now I see all my dynamic rigid bodies are affected by the gravity in the Z direction. But My kinematic controller is still under gravity in Y direction. Is there any setting that I can change?

Regards,
Saneesh
saneeshnair
Posts: 11
Joined: Thu Apr 07, 2011 5:59 am

Re: Issue with Bullet character controll

Post by saneeshnair »

Code: Select all

m_character->setUpAxis(2);
this solved the issue.

Regards,
Saneesh.