"btRaycastVehicle" rotation glitch

madhukishore
Posts: 3
Joined: Sat Apr 20, 2013 11:58 pm

"btRaycastVehicle" rotation glitch

Post by madhukishore »

Hello everyone,

I am using "btRaycastVehicle" in my game. And I am using exact same values as "VehicleDemo" but for some reason it is glitching.
One difference I can see is, I am using "Ogre3D" for rendering so have to feed orientation as Quaternion. And in the Demo it uses Matrix. I think that shouldn't give any glitch.

For more details please look at https://dl.dropboxusercontent.com/u/563 ... astCar.mp4 video.

Thanks in advance,
Madhu.
madhukishore
Posts: 3
Joined: Sat Apr 20, 2013 11:58 pm

Re: "btRaycastVehicle" rotation glitch

Post by madhukishore »

I observed on more thing. Even when my car is resting on the ground some time it still glitches. So it makes me think like it is not related to rotation. It is some thing to do with collision resolution settings/method or frame rate thing.

But I am using all the default resolution thing like in the demo. Also I tried different frame rates( like 120, 240, 420, even 640 just to test ), but it has that problem.
Any hints/thoughts would help.
madhukishore
Posts: 3
Joined: Sat Apr 20, 2013 11:58 pm

Re: "btRaycastVehicle" rotation glitch

Post by madhukishore »

I did further debugging by comparing values of my game with Bullet Vehicle demo. And I saw that there is nothing wrong with position but there is something wrong with orientation.

In bullet vehicle demo I get orientation as

Code: Select all

Quat( 1, 0, 0, 0)
But in my game I am getting orientation as

Code: Select all

Quat( 1, -1.45871e-007, 0, 0 )
And I further looked in to world transformation matrix and it has rotation part something like below:

Code: Select all

0                -0                    1
0.0000118         1                    0
1                -0.0000116           -0
Which is not Ortho-Normalized, I think I am missing something that is really simple step, either during initialization or during simulation.

Any help is really appreciated, I have been trying to fix this issue for a while. If you could guide me on how to approach debugging this that will be great.

Thanks in advance.