Ah I finally figured out how to recreate it. I installed the release version. Another case where it works great in the debug build but not in the release build. This is caused by something I had worried about but convinced myself it was ok. I'm doing a comparison of two floating point values which is normally a no no due to this exact reason. For some reason the comparison is failing even though the exact same X position is being fed through the calculations. So the comparison fails due to a floating point precision difference. Not sure why this only occurs in release versions. Probably something to do with the extra optimizations that occur for a release build.