My solution to the problem is a guarantee of separation. We ensure no entity ever intersects any wall. We check for collision before attempting to move an entity to a new place. If the target position collides, we make smaller and smaller safe steps on the segment of the speed until the ...