Comprehension problem with btRaycastVehicle::addWheel()

Please don't post Bullet support questions here, use the above forums instead.
Verbo
Posts: 39
Joined: Fri May 08, 2009 9:27 pm

Comprehension problem with btRaycastVehicle::addWheel()

Post by Verbo »

Hi,

I am a bit confused with the following parameters in btRaycastVehicle::addWheel()

const btVector3& connectionPointCS -> is it in world space or chassis space? Is it the wheel center or the hard point?
const btVector3& wheelDirectionCS0 -> is it in world space or chassis space?
const btVector3& wheelAxleCS -> is it in world space or chassis space?


Is "connectionPointCS" in the chassis space or in world space? And is it the position of the wheel central point or the position of the hardpoint of the suspension? For the moment I use the wheel center point. Then if I give the position in chassis space coord, my wheels are suddenly super low under the car and the car freaks out and falls very dumbly. If I give the position in world space, my wheels are now closer to the ideal position, but they are OVER the car instead of UNDER, and the car still behave weirdly, as if the raycast detected the car body as a ground object...

I was assuming that the "CS" suffix meant Chassis Space, but now I am a bit confused.

Can somebody help me sort this out?

Thanks :)

Verbo
Verbo
Posts: 39
Joined: Fri May 08, 2009 9:27 pm

Re: Comprehension problem with btRaycastVehicle::addWheel()

Post by Verbo »

Hi again,

Ok, I found the answer to my own question. The contact point was indeed the suspension hardpoint and it was in the chassis space coord. The problem came from the fact that I was using the wheel center and not taking the suspension rest length into account.

Thx.

Verbo