Search Unity

Jump Animation

Discussion in 'Getting Started' started by charliebradshaw00, Sep 5, 2021.

  1. charliebradshaw00

    charliebradshaw00

    Joined:
    Sep 4, 2021
    Posts:
    2
    Okay so I have animation set up for walking/strafing and I have my own character controls I am able to walk and jump around. My walking is animated but I do not know how to animate when my character jumps. Please help
     
  2. Pixelith

    Pixelith

    Joined:
    Jun 24, 2014
    Posts:
    580
    Google it.

    Playing animations is easily googled and already been answered plenty of times before with multiple tutorials spanning the subject.

    We don't know how your code works, what you're having trouble with, or if you've even tried anything yet.
     
  3. charliebradshaw00

    charliebradshaw00

    Joined:
    Sep 4, 2021
    Posts:
    2
    Ive tried so many things but I just cant get it to work. And sorry Im very new to Unity. If you would like me to elaborate I can, im just not sure how to
     
  4. Pixelith

    Pixelith

    Joined:
    Jun 24, 2014
    Posts:
    580
    You reference the animator. On you jump code, when you detect input for a jump and successfully jump, you need to access your animator and call you jump animation. Whether that's through animator.Play, animator.Crossfade, or transitions in the animator itself is up to you.

    If this explanation still confuses you, then you need to do tutorials before trying to make anything. Learning your tools and some basic coding will eliminate a lot of the questions and problems you're facing.
     
  5. KalOBrien

    KalOBrien

    Administrator

    Joined:
    Apr 20, 2021
    Posts:
    89
    Going to move your thread to getting started. Recommend you check out Unity learn guided courses to get used to general workflow stuff!
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Pixelith likes this.