I am creating a couple of objects which in normal circumstances would collide, but sometimes I create them overlapping to begin with (this is normal; they are sensors.)
While they do fire collision events regardless of their initial position, sometimes they do not achieve the _proxy (a userdata value) and _class (a table value) attributes.
Unfortunately, along with lacking these two values the bodies lose their .x and .y values - meaning that I cannot create a physics joint on them because I’m attempting to use their .x,.y values for the location of the joint.
I have no idea why. Anyone?
A little extra info: My situation is that these elements are placed into their initial position when created, but this only does not work sometimes when my code is restoring them from “saved position.” While it’s hard for me to discount the possibility that it is the save/load mechanism, I’m very sure this is not the source of the issue, as the problem is intermittent.
I’m trying to boil this problem down to simpler, postable code, but in the meantime if anyone has insight into the _proxy and _class values it would greatly help.