Calculate the jump into platform

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By soulldev

Hello, i’m making a 2D Runner game and i’m looking for a way for the player to jump to the platforms more easily than a normal jump.

So whenever you press “jump” , the player will immediately jump to the nearest platform.

Pixilart - runner2d by Anonymous

:bust_in_silhouette: Reply From:

Hello, happy to help! Can you assign a variable to the platform and when jump is pressed, it can move to that object? You can add_force and translate I believe.