Questions with vehicles

dedesite

12-06-2008 10:50:06

Hi all,

We are currently developing a Racing game using Ogre and OgreBullet and we have some troubles with the class WheeledRigidBody.

We want to change the vehicle's center of mass but we don't know how to do this. There's no "setCenterOfMass" function so if anyone could help us :D.

Also, we're wondering what does "frictionSleep" parameter do, because even if we set it to 10000 there is no change in the vehicle comportment.

Greetings,
Andreas

P.S : We'll release screenshots very soon ;).

adam23

13-06-2008 05:42:50

compound->addChildShape( col, chassisShift );

The chassisShift Ogre::Vector3 actually shifts the center of mass.

I have been working on getting vehicle physics to work decently with Bullet for about a week now. So if you find a magic solution to keep cars from tipping over, turning too sharp, etc Please share it, and I'll do the same!!!

Adam

dedesite

13-06-2008 09:20:42

Oh thanks for the tips adam23!!! :D

We're working on it since 1 or two weeks and we've got 3 months to have a complete car game. We'll release it in open source so don't worry, we'll share ;).

Greetings,
Andreas

adam23

14-06-2008 22:08:51

Sounds great, mine is slowly getting better but it would be great to get more open source projects on here for examples.

tuan kuranes

18-06-2008 15:43:24

It's hard to tweak the bullet version, if I was to make a car game, I would even do my own version of the ray car constraint bullet code, in order to get more controls.

Did you tried new terrain vehicle demo ? I think I tweaked car much more for this version.

tipping over
Check how Supertuxkart opensource project created a specific "joint" that prevent car to roll too much. I think it's a rather good idea.

turning too sharp
Steering should be somewhat related to time. elapsed


Anyway search bullet forums for more infos.

And contribute your vehicle back to bullet and/or ogrebullet ;)

dedesite

28-07-2008 14:36:34

Hello Tuan,

I just remark that you repply to this post....

It's hard to tweak the bullet version

Yes, we saw that !! :D

if I was to make a car game, I would even do my own version of the ray car constraint bullet code, in order to get more controls.

We have finally write our physic of car with separated wheel, engine and suspensions. It basically does the same thing than the bullet version but the engine model is more realistic (with gear ratio, engine torque etc.) and the tire model has been done by a very experimented physic's programmer (ok he spend only 2 hours on it but good hours ;) ).

There is still things to fix and to tweak like wheels shaking at high speed (it's like the centerOfMassTransform of the rigidBody is moving) or differences between debug and release versions but it's a good start!

Thanks for doing this wrapper.

Greetings,
Andréas