btVehicle and unit setup??

hellknows2008
Posts: 2
Joined: Wed Jul 16, 2008 9:38 am

btVehicle and unit setup??

Post by hellknows2008 »

Hi, I am developing a kart type racing game using bullet (2.69) now. I have no problems compiling and running the vehicle sample provided by the SDK. I also successfully integrated bullet's vehicle physics into my application.

However the artist I am working with is providing me art asset in 10 units = 1 meter format. When I had all the settings times 10 in bullet then the simulation started to behave weirdly, e.g. the wheels were not on the ground, instead, they sticked into the ground. I also encountered the same problem when modifying the bullet's vehicle sample so that everything was bigger. If I were to scale things down then the simulation went fine.

What I modified in the bullet's vehicle sample are as follows:

maxEngineForce, maxBreakingForce, wheelRadius, wheelWidth, wheelFriction, suspensionRestLength, CUBE_HALF_EXTENTS, chassis's box shape, chassis's localTrans, connectionHeight, and gravity (also m_cameraHeight, m_minCameraDistance, m_maxCameraDistance)

With all these multiplied by a float constant

I also tried scaling the margin too, but no luck.

Did anyone encounter the same problem? Or we better stick to 1 unit = 1 meter setting??

Any help is appreciated. Thank You

Vincent
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: btVehicle and unit setup??

Post by Erwin Coumans »

Until arbitrary world sizes are supported, it is best to stick to 1 unit = 1 meter.

If the artwork cannot be created in metric units, consider scaling the collision shapes and apply up/down scaling of world position when synchronizing transforms.

Hope this helps,
Erwin
hellknows2008
Posts: 2
Joined: Wed Jul 16, 2008 9:38 am

Re: btVehicle and unit setup??

Post by hellknows2008 »

Thanks for your quick reply.

I will try your method asap.

Vincent
Peixinho
Posts: 3
Joined: Thu Jul 05, 2012 11:14 pm

Re: btVehicle and unit setup??

Post by Peixinho »

Is this problem solved, or do I have to scale every thing down? I was having the same problem, when I create bigger vehicles everything behaves strangely. My art is much bigger than the example above.

Thanks in advanceadvance