If I understood the engine well enough I could fix it myself, assuming the changes to the sensors doesn't break something else.
The code for the Stencyl engine is available on Github. Does anybody know where to look for sensors and for general collision events?
Actually, I'm not sure if this is a
Stencyl issue or a
Box2d issue. I'm reading up on Box2d now. If I don't find an answer after a while, I'll ask on the Box2D forums.
update: It appears that sensors in Box2d do not call the pre-collision and post-collision callback functions. In other words, certain information about the collision or derivable from it is not available.
However, sensors do have the BeginContact and EndContact functions (or else they couldn't sense!) and these do have some physics info.
One difference between Begin/EndContact and Pre/Post solve is that there can be multiple physics events in a single collision, so multiple pairs of begin/end contact callbacks can be called between one pair of begin/end contact.
See
here for some more info about how collisions work in Box2d.
So basically, if the info I want is in pre/post solve but not begin/end contact, I am screwed (not really, but the solution would involve modifying the Box2d sensors or else creating a new type of sensor).