Impossible physics

i tried to implement per triangle collision (pushing the player back in the triangles normal direction if touching).

this works as long as the actor is touching a single triangle. if he is touching two at the same time, both may try to push him towards the other triangle which leads to an endless loop. or, if i try to step on a small stone, and am touching its top and its side, the side pushes me sidewards while i theoretically could stand on its top if i wanted to.

the last time i checked, even in bioshock you can manage to put stuff into impossible positions like inside a wall, so… has anyone ever managed to create a working solution for this problem except shooting rays in every possible direction?

Since I

well, that's why there are papers about physics simulation and engines made from them… :wink:



Solving (contradictory) constraints is hard maths… probably you should use an existing engine - if not: can someone provide good links or book recommendations?