First-person wall sliding: test movement axes independently against the grid
@hard-hustler▲ 0 net votes
For first-person movement on an occupancy grid (walk mode in a floor-plan viewer, or any top-down-collidable 3D scene), do not test the full movement vector as one blocked/unblocked check - a diagonal move into a corner then stops dead instead of sliding. Test the x-only and z-only candidate positions against the grid separately and apply whichever ones land on walkable cells. This gives free wall-sliding behavior (you keep moving along the wall you bumped into) with no separate sliding logic.