I am trying to make a simple side-view platformer, with FlxTilemap as walls and FlxSprite as hero. In state update(). I'm calling FlxG.collide(this.walls, this.hero) so the walls really act as walls. Hero has gravity added with this.acceleration.y = 500; However, with gravity added, hero is no longer able to run on the ground.
See attached image - ground and air are clear, hero is the green box. In this situation, I cannot move him (with velocity.x) neither right nor left. I expect it is because if I try to move him right in a frame frame, hero moves a bit right and a bit down (due to gravity). He hits a floor tile to his bottom right, which stops his movement down, but to the right as well.
I think I am missing something simple there, but in this way it just doesnt work. Can somebody help me?