I am currently frustrated beyond anything I can even express. I have lost more than 3 days to whatever the hell this is. I find this bug utterly indescribable.
I am using cpSpaceSegmentQueryFirst for ray casting. Its just a simple ray cast from the enter of the character down to the ground. Sometimes however, if I am walking on a flat ground and come up to a ramp, I simply pass through it. I have debug drawn literally every part of the system and *everything* shows that the ray is simply not registering that its intersecting with the ramp. I have tried this with the regular segment query function as well, it does the exact same thing.
This problem is extremely hard to reproduce, it does not happen consistently. It seems to change with the time that I start the engine and the surrounding scenery (such as if there are boxes laying around in the general area, NOT touching any of the involved shapes).
I have tried literally everything down to the point that I have placed 2 lines of ray casting code next to each other that are identical and stateless and they do different things. One detects the ramp, the other doesn't.
Given the unpredictable nature of this and the fact that the surrounding scenery seems to effect it, I'm thinking this is almost certainly some kind of bug in the spatial index. I have stripped down my own code to bare bones and I can find nothing wrong.
Is there any possible leads that you could offer? I have a project based on this due in a few days and this is the only thing which is keeping me from finishing.