Changing Coordinate system

Edgard
Posts: 11
Joined: Wed Mar 30, 2011 2:12 pm

Changing Coordinate system

Post by Edgard »

Is there a way to change the coordinate system in bullet? I think it would be a really handy feature if it's not in there...

In our application the we have a left-handed coordinate system with Y as up-vector.
What would be the best solution to correct the difference in the coordinate system?
ciphr
Posts: 15
Joined: Mon Mar 28, 2011 9:11 am

Re: Changing Coordinate system

Post by ciphr »

AFAIK, the best method is using MotionStates. You just implement your own setWorldTransform and getWorldTransform, putting there algorithms to convert coordinate system from bullet to yours (and applying coordinates to your mesh) and vice versa.
See also bullet manual, hope this helps.
Edgard
Posts: 11
Joined: Wed Mar 30, 2011 2:12 pm

Re: Changing Coordinate system

Post by Edgard »

I was afraid of that... Isn't that quite a performance issue (converting everything every frame) and it's also quite "open" for bugs?
Everytime I would need to interact with the physics middleware, I'll have to take into account the different coordinate system :?