Search Unity

Slowing movement speed while in air "jumping"

Discussion in '2D' started by IceeV, Jul 24, 2019.

  1. IceeV

    IceeV

    Joined:
    Jul 22, 2019
    Posts:
    3
    Hello everyone!

    I'm learning how to script and im still very much a beginner and i've been trying to figure out a way to slow my player's movement down while they are jumping. currently the jump feels weird because my player can continue to move at the full speed value while jumping. i want to make it more of an arc. for example while they are jumping there is a small force to pushes against the direction they are moving that slowly increases to simulate gravity over powering the character and bringing them to the ground because a person has more momentum and can over power gravity more at the begging of the jump than towards the end..

    does anyone have a reference i can look up to learn the code that can do that because Im interested in getting it working but also understanding exactly how the code works and why.

    Thanks in advance!