I'm building a game where the user can draw lines (line segments are boxes, static bodies) to interact with the world. Some levels have moving platforms (kinematic bodies).
Here's my issue: Sometimes the user can draw a line that traps dynamic bodies between the line and a moving platform. When the bodies get trapped, the game hangs.
I tried using the ContactListener to test the impulses on the dynamic bodies against a threshold, and removing the bodies if the impulses are too high. However, when the platform is moving slowly, the impulses on the bodies never get very high, and if I lower the threshold the bodies are too fragile for other aspects of the game.
Does anyone have any recommendations for solving this issue? I'm using the Flash port 2.1a.
Here's my issue: Sometimes the user can draw a line that traps dynamic bodies between the line and a moving platform. When the bodies get trapped, the game hangs.
I tried using the ContactListener to test the impulses on the dynamic bodies against a threshold, and removing the bodies if the impulses are too high. However, when the platform is moving slowly, the impulses on the bodies never get very high, and if I lower the threshold the bodies are too fragile for other aspects of the game.
Does anyone have any recommendations for solving this issue? I'm using the Flash port 2.1a.