Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> "because a movement could result in a collision with somebody else who had wanted to move"

Similarly useful when simulating physics: evaluate forces effecting entities, then evaluate movement for the next step regardless of collisions and then resolve the collisions by applying a virtual repulsive force moving the objects out of the "impossible superpositions".



How do you address the problem where you get impossible superpositions that are difficult to resolve via repulsive forces, leading to a massive deposition of energy in the objects?

http://i.imgur.com/ZgMNXpS.gif


Cap the forces and/or trigger a more refined resolution mechanism, and maybe also force set the objects in a plausible {position, velocity}. This kind of simulation is by definition an approximation. You can detect impossible superpositions because they result in impossible forces. This is of course not applicable to the general case, so it depends if you want realism racing or massive unit count RTS physics.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: