I've been banging my head against the wall on the subject for two days now - I can't get the box2d Sensor fire the handleBeginContact event when the sensor collides with a platform. The event is fired only if Hero collides with the sensor.
I'm trying to make a game in which all Platforms are static and the camera is "chasing" the hero. The game ends when hero falls from a platform into the abyss of nothingness or the side of the screen catches up with hero.
Building a prototype was quite easy, but the performance needs to be improved significantly (object pooling, removal of repeated calls to width and height). The most important requirement for me is to detect the moment when a platform is entirely visible on the screen (due to camera movement) and the moment when it's completely gone.
The basic idea was to place two sensors on each side of the screen, which move along with the camera, and wait for onEndContact signal dispatch. But this never happens.
I've checked the solution given by JaimeDominguez (http://forum.starling-framework.org/topic/enemy-not-colliding-with-sensor) for two sensors, but it only worked with hero. I even tried switch to Nape and still - no luck!
Maybe there's another way to do that - a function that tells you if object bounds are inside current vieport?
Any suggestion would be greatly appreciated.