I realized this fixes the frame rate issue. This strategy just moves the hector away from the wall it is intersecting by a very small amount and retests until it is not touching anything. I would rather calculate exactly how far to move the hector and do it on the first try, but this works for now.