Hi everybody. First let me say Box2D is great framework and amazing tool. Kudos to all the people who worked/work on it. As for the reason I'm writing here:
I am writing a normal platformer game(2d view, player walking, jumping on tiles etc). I have very annoying problem that I have no luck eliminating. Basicly what started to happen was player stopping DURING walking on the ground. I couldn't figure out why this was happening for couple days, but today I was able to find out the reason for it, which is already over half of success. The problem were sensors who were on the course of the player. Player when walking on the floor is sometimes walking through some objects that have static bodies, and sensor parameter set to true. Once that occurs, something happens backstage and the physics engine is getting confused, and (not always, but pretty often) it stops my player. I keep the button to move left/right pressed down, the animation is still running, but the player is not moving as if he walked into a wall(but he didn't, he has open space in front of him).
This happens most often DURING the contact with a sensor, but on rare ocasions it happens even after the contact ended with the object who was sensor. Once I removed bodies for those sensor objects and just left the sprites, the stopping was not happening anymore and the player was walking normally. But with those objects having static bodies and sensor parameter to true, the engine is starting to act strange.
Is it some kind of a bug of Box2D, or am I doing something wrong here/am missing something?
cheers
Lucas
I am writing a normal platformer game(2d view, player walking, jumping on tiles etc). I have very annoying problem that I have no luck eliminating. Basicly what started to happen was player stopping DURING walking on the ground. I couldn't figure out why this was happening for couple days, but today I was able to find out the reason for it, which is already over half of success. The problem were sensors who were on the course of the player. Player when walking on the floor is sometimes walking through some objects that have static bodies, and sensor parameter set to true. Once that occurs, something happens backstage and the physics engine is getting confused, and (not always, but pretty often) it stops my player. I keep the button to move left/right pressed down, the animation is still running, but the player is not moving as if he walked into a wall(but he didn't, he has open space in front of him).
This happens most often DURING the contact with a sensor, but on rare ocasions it happens even after the contact ended with the object who was sensor. Once I removed bodies for those sensor objects and just left the sprites, the stopping was not happening anymore and the player was walking normally. But with those objects having static bodies and sensor parameter to true, the engine is starting to act strange.
Is it some kind of a bug of Box2D, or am I doing something wrong here/am missing something?
cheers
Lucas



