[Platformer] Need character to die when hitting a side of a wall but not top or bottom

SamenaiSamenai Member Posts: 3
edited July 2012 in Working with GS (Mac)
It's a constant runner, so the character is accelerating at a certain speed. Our initial fix was to create another actor placed next to the wall and create a collision that causes the character to die, but the heights of the walls are different so we couldn't have a definitive height. We also couldn't put the actor up to the last pixel otherwise the character would die when successfully jumping onto the wall. This caused the character to hit the top corner of the wall rarely and stick into it.

Basically what I'm thinking is have the character die when he hits a y-axis (vertical wall), but not an x-axis (horizontal wall). I have no idea how to implement this however and I need help.

Additionally, I used the "is.grounded" system for jumping from the platformer tutorial, but it works unintended when the character hits the bottom of the wall as well, so the character is constantly jumping if the player holds the space bar.

Answers

  • OskarDeveloperOskarDeveloper Member Posts: 533
    Wait did you say you used "accelerate" to move the actor?
  • SamenaiSamenai Member Posts: 3
    Had to check, but yes, it's accelerate. Is moving the level instead of the actor better?
Sign In or Register to comment.