dangerdave99 wrote:
"Can the direction be determined and then just flip it?"
its not quite that simple. ill give you an example. lets say you drop the car from 1000 feet. as it falls towards the ground the entire system is building up alot of energy as it travels faster and faster. when it does finally hit the ground the energy that was built doesnt have any way to dissapate. so if we detected that the wheels flipped on the roof and we tried to flip them back much of that downward force still exists for a number of simulation cycles. the very next fram the wheels will be right back on the roof again.
so the approach im currently coding is to first detect that a collapse may happen and freeze the simulation, well more accuratly divert to seperate loop, and bleed off the excess energy and allow the springs to relax. by using this method it is possible to prevent the structure from almost never getting into a inversion state to begin with.
so to put it simply. rather than try to fix it after its broken, my choice is to prevent it from happening in the first place.
so far it working 90 percent of the time. the last ten percent is the hard part.
"Can the direction be determined and then just flip it?"
its not quite that simple. ill give you an example. lets say you drop the car from 1000 feet. as it falls towards the ground the entire system is building up alot of energy as it travels faster and faster. when it does finally hit the ground the energy that was built doesnt have any way to dissapate. so if we detected that the wheels flipped on the roof and we tried to flip them back much of that downward force still exists for a number of simulation cycles. the very next fram the wheels will be right back on the roof again.
so the approach im currently coding is to first detect that a collapse may happen and freeze the simulation, well more accuratly divert to seperate loop, and bleed off the excess energy and allow the springs to relax. by using this method it is possible to prevent the structure from almost never getting into a inversion state to begin with.
so to put it simply. rather than try to fix it after its broken, my choice is to prevent it from happening in the first place.
so far it working 90 percent of the time. the last ten percent is the hard part.