Second Pass
After trying to look into what I missed during the first pass of the algorithm I still couldn’t fix it. I tried different things and carefully reading the forum post. The issue seems to be with the negative axis that gets checked. So I think it can work fine for positive axis, but problems start to arise when the axis is the opposite direction.

Last modified: November 6, 2022