Dealing with slopes!

Photon

  • Posts: 2693
I have been tinkering around with different codes and messing with pre-shipped behaviors to try and get what I am looking for, but it seems a bit trickier than it seems. So:

1. What is the best way to have a player transition from running up a slope to running on flat ground without having them jump up at the end of the incline (i.e. as if they were riding off a ramp)?
2. If I set friction to 0 for my player, this prevents sticking to a wall, but likewise, he has a tendency to then slide on slopes when not moving. If I turn the friction up even a little, he starts sticking to the wall. What is an appropriate remedy to this?

Suggestions?
Do NOT PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!

Nomosoft

  • Posts: 122
I have been tinkering around with different codes and messing with pre-shipped behaviors to try and get what I am looking for, but it seems a bit trickier than it seems. So:

1. What is the best way to have a player transition from running up a slope to running on flat ground without having them jump up at the end of the incline (i.e. as if they were riding off a ramp)?
2. If I set friction to 0 for my player, this prevents sticking to a wall, but likewise, he has a tendency to then slide on slopes when not moving. If I turn the friction up even a little, he starts sticking to the wall. What is an appropriate remedy to this?

Suggestions?

The Run and Jump example game has some slope-related behaviors, such as stopping your player character from sliding down while he is standing still.

Photon

  • Posts: 2693
Which game are you talking about? As far as I was concerned, none of the platforming example games have much in the way of slopes. Could you post an example of such code please?

Edit: Found it. You meant the starter platformer kit.

« Last Edit: May 15, 2012, 02:56:25 pm by Photon »
Do NOT PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!