It's actually quite entertaining to get in a huge accident, have all four wheels relocate to the roof, flip the car
over and keep driving. :)
I had a thought about how to keep the verlets from reversing like that. The way they're dealt with now, the
verlets get knocked around every which way, then the constraint routine pushes them apart or pulls them together
without particularly caring what the respective angles are at the time of correction. 99% of the time this works fine,
since other constraints will eventually pull the whole mess back into position after a few iterations, but if a
collision pushes one verlet *past* another, the constraint will "snap" in the wrong direction. Once it's past this
point of no return, the other constraints may not pull it back into its correct position.
This is a tough nut to crack. I've thought about polling constraints for their relative directions and building
a "consensus" for the orientation of the verlets; if one verlet seems to be pointing in the entirely wrong
direction, it's been inverted and needs to be put in its place.
I have other ideas too. More testing.
over and keep driving. :)
I had a thought about how to keep the verlets from reversing like that. The way they're dealt with now, the
verlets get knocked around every which way, then the constraint routine pushes them apart or pulls them together
without particularly caring what the respective angles are at the time of correction. 99% of the time this works fine,
since other constraints will eventually pull the whole mess back into position after a few iterations, but if a
collision pushes one verlet *past* another, the constraint will "snap" in the wrong direction. Once it's past this
point of no return, the other constraints may not pull it back into its correct position.
This is a tough nut to crack. I've thought about polling constraints for their relative directions and building
a "consensus" for the orientation of the verlets; if one verlet seems to be pointing in the entirely wrong
direction, it's been inverted and needs to be put in its place.
I have other ideas too. More testing.