Quote: "I bet its because the wheels aren't really round. It's probably so sensitive to the flat spots on the wheels. Just a guess."
.. And a Good Guess it is!
What's odd is that there really aren't wheels as far as the physics engine is concerned! There is something like a wheel... but its not in anyway related to a mesh. Isn't that odd? I know it sounds silly - but the wheels you see are objects that just sized according to the diameter "they are supposed to be" to give a visual.
The way it works are these things called "Sensors"... they are like a RAY CAST, and you iterate through them and do math based on the info you can get from them... like the collision normal (to the ground) and you can can make them springy (The cause of many a car flying off in to space is the elastic properties of these things! LOL - I'll eventually care about dampening stuff - its just a demo of what's coming
) Well - they server as your suspension also... The Wheel is just suspension length plus diameter / 2.
Now - the sensor is fixed to the rigid body of the car, and translates spring forces to it. Additionally... to give each wheel traction - you apply "force" and "torque" to them - which is why I was able (during development horsing around figuring it out) why I was able to make a car that was popping wheelies! I've already been thinkning about the motorcycle bit and that makes for an interesting puzzle.. that might be solved with some "centrifical" (Spelling? LOL) forces being applied appropriately... or something less "realistic" combined with the physics to give a decent play.
So - I haven't got the problem nailed - nor am I currently worried about... because there are alot of other variables I've yet to mess with that might be effecting it.. such as I don't dampen forces yet - and this is why the cars may jostle when idle... they still have some minor forces bleeding off... With a simple "range check if force < whatever - then clear" kind of thing - that can be eliminatedc. Another issue is I'm using all default material ZERO in that demo - the ground, the car, the buildings, the walls - they all have friction and resititution like a wet rubber gym floor it seems. I can have many materials... and on terrain actually apply a material per poly! Snow - ice - concrete - scattered about! (I like that feature - but haven't toyed with it yet. I'm currently reorganizing the code to be integrated with the rest of my JGC lib, and already it's integrated into the frustrum culling system etc.
Multi-Threading - The multi-threading toggle utilizes some code I wrote that fires off the physics calculations in a separate process (often other CPU or CPU core) while I call the DarkGDK sync function. The reasoning is I get two major time consuming tasks working in parallel.. when the two tasks meet up on the other end... I then manipulate the DarkGDK objects (if enabled - like they are in these demos) to be oriented as the physics engine dictates. In short - on a REALLY fast video card and PC - its not a big difference... but regardless - it tends to always run faster using this technique.
My favorite part of this physics engine is HOW LIGHT IT IS! It's FAST! And I have the source code so I'll be doing whatever is necessary to maintain and improve it. I've read there are some quirky things in it regarding slide joints and even those sensors... but I plan to hammer it out.
You might have noticed the rag doll demo is particulally smooth... and in that primitives demo... I'm throwing 1500 live physics objects around and FPS hardly EVER dips! that's pretty darn cool!
thanx for stopping by! I'm liking the looks of your project as well... and I for one love how your tracks are coming out! Guess I need to write a DBPro plugin now for this engine eh?
--Jason