Gnollrunner said:
I seriously don't understand your issue. If the ball is being pushed directly left, it's stuck.
With ‘stuck’ i mean the problem that you can't get back either. Ofc. it's fine if you can't move forward anymore, but such narrowing passages can indeed make the player (or at least dynamic objects) get stuck in some games.
And in many games it's easy to get stuck if the geometry is noisy. You somehow manage to get ‘in’, but then you can't get ‘out’. Happens quite often, and then you have to reload / restart, which is the worst thing that can happen.
I don't mean situations where my way is ‘blocked’ due to obstacles, which ofc. is no problem but expected.
Gnollrunner said:
Note the Z axis is along the cross-product of the two plane normals so it's moving along the that vector which is the cross-product of the normals. So what exactly is the confusion?
Oh, i think get it now: If the player keeps pushing into the narrowing corner, he can't. And instead his motion is projected to the cross (Z axis), so he can only go sideways from his view. Makes sense.
Gnollrunner said:
Come on, that's the easy case. The OP drew that in his first post, and you drew it too. How can it be you don't get it now.
My point is not that some cases are hard or easy, but that you need to treat cases differently at all. If you have one contact, it's easy. If you have two, it becomes a special case you handle differently with the cross direction. If it's many, you may try all potential combinations, picking the one which is closest to the players input? Whatever, it's another special case.
That's certainly higher complexity and more potential issues than allowing penetration to happen, but then resolving it afterwards. A well defined optimization problem without special cases, and the behavior is intuitive to predict and play as well. This has its own problems and limitations, but just saying.
Gnollrunner said:
If the 3rd contact in the touching list is blocking the cross product of the other two, you are still blocked as you should be.
But the outcome depends on the order of which two faces you use to form the first cross? How do you determine this order?
Gnollrunner said:
There are some details, but I thought it was obvious if you know about the sweep algorithm, that you can't move through geometry.
That's the goal, but there is no guarantee it always works. It works as long as there is enough empty space, but if you fill the space with enough characters penetration will happen.
Or you have things like doors, elevators, moving platforms, etc. If the player blocks their path, penetration will happen.
If you have some physics going on with joints or large mass ratios, joint limits will be violated and penetration will happen.
Even with only static geometry and a single player, make the geometry noisy and complex enough and penetration will happen.
So it depends on your game and geometry. But often it's necessary to deal with penetration, if only for the cases where things go wrong.