playMaker

Author Topic: 2d jumping and walking bugs  (Read 1793 times)

sleud

  • Playmaker Newbie
  • *
  • Posts: 4
2d jumping and walking bugs
« on: September 28, 2015, 11:29:27 AM »
Hi there,
I have a strange bug : I'm making a 2d platformer game and I've created simple controls for my player : go left, go right and jump.

To move, I use a "get axis", a "set velocity 2d" and it works but sometimes when I keep the right button down, the player strangely stops moving. I have to go left and then right again to make him move again.

To jump, I use a simple "add 2d force" in another fsm. The player jumps when the space bar is down. If I only press space, the player jumps normally but when I use the right or left button and the player hits a wall or a block on his side, he freezes and I have to let go in the opposite direction to make him move again...

Anybody knows how to fix this ?  :)


sleud

  • Playmaker Newbie
  • *
  • Posts: 4
Re: 2d jumping and walking bugs
« Reply #1 on: September 28, 2015, 11:42:17 AM »
Okay I fixed the jump problem, I just add a 2d Physic material and I set the friction to 0.001 so the player slips along the walls when he falls !