![]() The caveat is that, whenever you take away control from the player like this, you need to clearly communicate the expectations, otherwise the player can get frustrated. ![]() For example, stairs are a special kind of slope, which in some games you can't jump on at all. Maybe you decide that slopes are kind of special and it doesn't make sense to jump on them. The caveat is that on very steep slopes, you often end up jumping backwards. You may remember this behaviour from the Sonic games. When jumping, your jump impulse is in a direction (red) perpendicular to the slope (green). ![]() The caveat is that if your character is racing up a steep slope, you can now jump up very high. The resulting velocity (blue) will always take you above the slope, so as long as your slope doesn't get too much steeper soon, your character will always jump above the slope. To jump, you add a vertical impulse (red) to your movement velocity (green). The physically "correct" way (vertical impulse) ![]() There is no "best" and you still have to decide which one is right for your game. Here are some examples of how games (runner or otherwise) have handled this situation.
0 Comments
Leave a Reply. |