2 ms·
If I remember correctly from when I read about this 10 years ago, enforcing constraints by adding restoring forces/impulses is a bad way of doing it, because it
by lutorm 16y ago
If I remember correctly from when I read about this 10 years ago, enforcing constraints by adding restoring forces/impulses is a bad way of doing it, because it gives very stiff equations. It works decently for soft constraints, like springs, but if you want to rigidly enforce a constraint, you need very large forces which are applied very suddenly, and to integrate such a system you need a very small time step. My impression was that it was much better to design your constraints into the equations of motion such that you reduce the number of degrees of freedom of the system and solve directly for the "constrained" motion. But that was research papers. Do real game engines use the method described here? Maybe the difference is the degree of "realism" required.
- wladimir 16y agoGames engines have these problems too. But instead of solving it mathematically which is hard (and still result in a pretty inefficient algorithm, as game worlds usually consist of complex geometry, not simple shapes), it is usually hacked around in some pragmatic way that still looks good.