i have followed this document a little bit and also tried to implement the things you pointed on, seperate detection and response.
I now have a function that returns data that we need when solving response.
I think the key to the good routine my first version compared to my latest is to not just "push-out". Instead, calculate time of impact from a velocity.
Then get new velocity and run checks again.
And my pseudo code works like this now:.
Before movement, see if the player is free: 1.0 = free < 1.0 = we hit something and return the time t of impact.
If we dont hit anything, just move player
If we hit we check:
If player is not very very close, move the player close to the impact line - a little value
Now take the new velocity and run the function again recursivly.
This works now brilliant on edges corners, but have some problems in the vertex edges.
My next update will be to add checks for "edges" first and handle them seperatly.
I have uploaded a new document Version 4.