Search Unity

A jump script?

Discussion in 'Getting Started' started by BobPop, Dec 29, 2015.

  1. BobPop

    BobPop

    Joined:
    Dec 29, 2015
    Posts:
    1
    As the title says. I'm making a 3D platformer-ish puzzle game, I've got the movement script, but I don't have a jumping one. I've found threads for them, but none of them worked.

    They said start simple, and even simple is hard for me.

    Any help is appreciated.
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Jumping could be very different depending on the specifics of your game, such as if you're using the physics system or are simulating gravity yourself with code.

    I know that jumping is covered in the Infinite Runner tutorial, and I'm sure it's covered in other places as well. I'd start there, and see how you can adapt what he's doing to fit your needs.
     
    JoeStrout likes this.
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yep, what @Schneider21 said. I also cover jumping in my animation methods article; even though that is 2D, the same techniques should apply to 3D too.

    But it's important to not simply try something and say "it doesn't work" and move on. You should figure out why and how it doesn't work, and then you will probably see how to make it work in your game.
     
    tedthebug and Schneider21 like this.