Rolling back X and Z when any collision occurs would prevent you from "hugging" (i.e. sliding along) walls. The problem was that a near corner collision wasn't correctly detected when the player didn't collide in X direction in the last frame (last_x) but does collide in the current frame (t.x), allowing the player to move into the corner in Y direction.
Rolling back X and Z when any collision occurs would prevent you from "hugging" (i.e. sliding along) walls. The problem was that a near corner collision wasn't correctly detected when the player didn't collide in X direction in the last frame (last_x) but does collide in the current frame (t.x), allowing the player to move into the corner in Y direction.
Thanks!