Pre-packaged physics system

Blitz3D Forums/Blitz3D Programming/Pre-packaged physics system

"Anyhow, the car model in the demo is made from a number of ODE objects and ODE joints - the wheels are spheres (an unfortunate problem but there is no cylinder->poly collision in Blitz at the moment to get around this)"


You COULD use meshesintersect though, and toss out the whole Blitz collision system.

Cylinder collisions alone will not give you an accurate simulation of a tire any more than a sphere will. Real tires deform where they press against the ground and you get a square cross section of area where contact occurs. That's a lot more contact than you would get with a cylinder which would contact at only a single line.

But it may be that for the purpouses of the simulation that is totally uneccessary detail. If that is the case however, then I would argue that the sphere collision model should therefore be just as good as a cylinder model for the tires.


"The suspension joints in ODE are prefectly OK, but without at least some form of realistic simulation of rubber on tarmac the car will behave like it's either driving on ice or on velcro."

Yeah like I said. But one thing I was considering now is that you're inputting certain values into the physics simulation that take that into account aren't you? I mean, you have to tell it how much the sphere sticks and slips. It doesn't calculate that at ALL using the actual surface area of the sphere that is in contact with the road. So making a more accurate contact model seems like it would really only have an effect when transitioning from flat surface to a hill breifly.


Anyhow, you still haven't explained one thing. Why do the front two tires of the car seem to jerk suddenly, rotating to the left or right, and then sticking in that orientation after you go off a jump? That is the problem which I think a spring would solve and which I think would help to improve the driving model. Without a spring there it seems to me that that will cause all sort of prblems, especially on landings. Those front tires should not be so easily forced to rotate like that and once rotated they should spring back quickly to a neutral position while in the air so the car lands on all four tires and not on just three with one at an angle.


"I really wish someone would package up a "CAR PHYSICS SYSTEM" userlib for Blitz, incorporating all these things."

I thought about doing that once, but simulating physics on this level is about 100x harder than simulating an airplane and I had a hard time juet getting the numbers I needed for a real plane to be able to simulate it and m resulting simulation didn't feel very good. And it took me a week to program.

But stick and slip and sliding friction and stuff... These things require a college level knowledge of physics, and a knowledge of calculus to be able to read the formulas online which I don't have. And I don't know anyhting about driving a racecar (or a plane for that matter) and so I don't know what feels right and what feels wrong... which makes it impossible to debug such a simulation.

So that's why I haven't done that. :-)

I figure if I make a car game eventually I'm going to stick to a simpler simulation. I'll model springs for shocks, and use my ball bouncing physics with variable elasticity for the tires, and add some movement constraints so that there is a lot of friction when the car tries to move sideways but little friction when it moves forward and backwards so that it will be ableto slide sideways if a big enough force is applied, but tend to roll forwards and backwards only.