Interesting thing I stumbled across while implementing my own block solver. Most physics engines are doing collisions pair-wise (as am I). This brings up the question: what order do you solve this binomial collision problem? I have to look more into bullet to see if it comes up with an "optimal ordering" of solving colliding pairs. Basically, in a PGS solver, you have the choice of resolving collisions like 1):
Code: Select all
for n iterations
for every colliding pair
solve constraints
end
end
Code: Select all
for every colliding pair
for n iterations
solve constraints
end
end
Code: Select all
for m iterations
for every colliding pair
for n iterations
solve constraints
end
end
end
Anybody have experience with this problem? Any ideas on the optimal method? If I set m to 30 and n to 3, I can stack boxes fine, but 90 iterations is a little ridiculous for a game. Anyway, let me know your thoughts.
Mike