I have this problem where my little character will be walking left or right just fine, and then it suddenly acts like it hit an invisible wall and can't continue. I have to make it jump or spam left and right to try and get it to go forward again. I made a long floor block in case the problem came from individual blocks it stands on, but it still happens sometimes on both. My enemy object also randomly gets stuck to a wall after colliding. Is there something I can put in or take out of my characters' behaviors that will prevent this?
http://www.flowlab.io/game/play/807319Often times, I'll have it go one direction, like right, and it can't continue moving. I'll walk it back left, then walk right again and the invisible "wall" is still there. Jumping while right up against the "wall" prevents it from moving right while jumping, so I have to walk it left and jump over to move past it. I'm sorry if I'm writing too much, I just want to be clear first time around :y
Comments
Change the player's collision shape to circle.
If you don't want to change it to circle then you would have to do weird stuff: when colliding to the left or right move 1 pixel up (position behavior "+x", connect a number -1 to it). When colliding left move 3 pixels to the right, when colliding right move 3 to the left.
If it's an enemy you would have to make a specific object for the enemy to collode with when it has to flip.
This is what I did in Cube's Adventure 2.