I've done rigid body dynamics before, and wrote a simple physics
engine, but I am wondering if there is any "quick" way of keeping the
wheels above the track, rather than doing point in poly detection.
The problem I had when developing my physics engine was that to find
the collision point I was sub-dividing the time-step and this caused
it to slow down quite a bit.
So I was just wondering if there is some "quick n easy" way of doing
it. What I thought of last night was to find that the wheel was
penetrating the surface, and then work out how much it was penetrating
by. Once I've found that, I simply set the wheel to be not
penetrating and use that offset to determine the amount of force on
the suspension.....
It would probably be easier to explain if I could draw a diagram, but
my ASCII art isn't that good ;-)
Oh, and if you want some help with your rigid body application, drop
me an email and I'll see if I can help.
Nick.
> > If the road is a completely flat surface, then I guess it would be
> > quite a simple "hack" to keep the Y-axis of the wheel constant so it
> > won't move up or down. But I want to be able to drive up hills, on
> > slopes, etc or do take off (in the event of hitting a ramp!). So, how
> > to do it?
> With great difficulty :-)
> What needs to be there is rigid body dynamics, to allow the car to twist and
> spin and
> leave the ground, and collide. Then you need to have a polygon collision
> detection
> system to test where the road and other objects are. The two go together.
> It is best to start with rigid body dynamics first, then move to collision
> detection.
> It is pretty complicated stuff though, and I am in the phase of doing this
> myself.
> At the moment just a simple 2D rigid body application, which I'm having
> problems
> with, so 3D isn't achievable for me just yet :(
> Do a search for "rigid body" or "Chris Hecker" on google, he has written
> some
> articles about it which I am using to develop such a system (though not with
> great success at the moment!)
> Regards