How to make a car sliding?

Blitz3D Forums/Blitz3D Programming/How to make a car sliding?

OverDozing(Posted 2004) [#1]
Hey,

I was wondering how would you create your code to make a car sliding in turns if speed is enough fast?
I've been trying to do it using Tokamak, but I have to say, this is too complex for me .. :/

Currently, I have a pivot that place the camera and the car.

Thank you for any help ! :)


Rob(Posted 2004) [#2]
Check out code archives. Vorderman has done a car sample based on the marco monster code afaik.


IPete2(Posted 2004) [#3]
HRC,

Also check out the Tokamak car demo. You'll need the wraper, but I have adjusted the car demo - put my own car in and had it sliding and tumbling rolling over under heavy high speed cornering.

Tokamak is really worth a look!


IPete2.


Jeroen(Posted 2004) [#4]
Tokamak (wrapper) is not really suitable for car physics....YET.


OverDozing(Posted 2004) [#5]
I tried Tokamak yet, it's too difficult to play with all the parameters, I would prefer an other solution ! :)


Bot Builder(Posted 2004) [#6]
The prob is the tokamak friction model. It really isn't very good at all. Probably the worst part of the engine. You can however, make your own friction. Check collisions each frame and for each one apply a force to each rigid body at the point of contact in the direction of motion of the rigid body, with a magnitude proportional to the speed.Kinda complex, but gives you lost of control over dynamics. tons of room for tweakage.


OverDozing(Posted 2004) [#7]
I've got many problems with Tokamak, for example I see the wheels going crazy on the axes, when I reduce the mass or the gravity, it kinda correct the problem but after that an other problem come in...
I am sure it's not tokamak fault, but I am not enough good yet to play with tokamak, I spend like 2 weeks trying to learn but this is very hard !

I was wondering, could it be possible to setup only 1 box for my whole car, the wheels would be integred into my mesh.

This way no more problem with the joints and less parameters ?


IPete2(Posted 2004) [#8]
HRC,

Don't dispair - keep on at it - Tokamak is complex, and really the only way to learn it is to use it lots and lots.

I am a novice with it, but I continue to come back to it to try to learn more and more again and again.

I am not there yet but then at least I am on the way.

There is currently only the Verlets code which I believe comes close to what Tokamak achieves, and I have had loads of time with verlets and still don't really have much of a clue about it!

In any case they are both great pieces of code.

I think I can get more ouit of Tokamak myself, and in the long run that is where my money is. Rememeber with Tokamak, start small, do simple things first. Play lots and lots. It will come , an understanding will develop.

Best regards,

IPete2.


Billamu(Posted 2004) [#9]
You could look at this car tutorial at http://www.blitz3dfr.com/home.htm

The website is in French, but Blitz Code is in Blitz Code. Click on "Un jeu de A a Z" (A game from A to Z) you'll see the tutorials there. Click on the telecharger (download) buttons.

I don't know if this comprehensive enough for what you want out of car physics, but it might give you some ideas.