Vehicle probs: jumping chassis, rolling over, wonky wheels!

UselessRob
Posts: 3
Joined: Mon Aug 27, 2007 3:36 am

Vehicle probs: jumping chassis, rolling over, wonky wheels!

Post by UselessRob »

Howdy

I'm new to Bullet and loving it so far. Haven't found any other Physics engines so easy to integrate into my own stuff. However, I'm trying to do vehicles based on the vehicle demo n having some problems/questions:

1. Wheels seem to drift forward as the car drives, then every couple of seconds the chassis jumps forward to catch up. Is this a newbie thing I'm doing wrong? I'm using the world transform returned by the m_chassis variable.

2. The car seems to roll very easily when taking any corners or going over bumps. Is there a way to make it more stable? If I reposition the wheel mount points as has been suggested elsewhere, wont the graphic representation be wrong?

3. When the car drops from a small height, the back wheels end up "wonky". That is, they don't seem to turn on the usual access any more?

4. Also when the car drops a little, the wheels jump up thru the chassis and then spring down again. How do I set a limit of how high up the wheels can go in the chassis so they don't pass thru it?

5. How big should my car be? I mean, should it be a real world relation of 1 unit = 1 metre on a real world car?

It's very possible I'm doing lots of things wrong, so I apologise if these are stupid questions. But I'm loving this thing, and would like to get it going properly.

Any help would be greatly appreciated!

Thanks!

Rob.
UselessRob
Posts: 3
Joined: Mon Aug 27, 2007 3:36 am

Post by UselessRob »

Sorry! Scratch number 1 off that list, I was doing it wrong! I switched to using the matrix from getMotionState()->getWorldTransform() instead and the chassis no longer drifts off the wheels! Sorry!!!!!

The others tho, I'm still stumped with. :)
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Vehicle probs: jumping chassis, rolling over, wonky whee

Post by Erwin Coumans »

Please compare and experiment with the VehicleDemo. If there are problems with that demo, please let us know.
5. How big should my car be? I mean, should it be a real world relation of 1 unit = 1 metre on a real world car?
It is recommended to assume usual gravity (9.8 m/s^2), so 1 unit becomes 1 meter. Please check the Bullet user manual for general setup.
Thanks,
Erwin
UselessRob
Posts: 3
Joined: Mon Aug 27, 2007 3:36 am

Post by UselessRob »

Thanks heaps for the reply! The sizing stuff helps big time.

the problem with rolling over etc was of course to do with the centre of gravity. When I lowered it, the wheels didn't touch the ground......

Was one of my smarter days. Lower centre of gravity, raise the wheels, and now it drives like it should. Outstanding.

Thanks!