Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Sudden halt when landing on ground

Discussion in 'Physics' started by Kechrimpari, Jan 3, 2024.

  1. Kechrimpari

    Kechrimpari

    Joined:
    Apr 5, 2022
    Posts:
    56
    Essentially, when my player jumps and lands, there's a moment where they kinda halt. It's not the velocity, there's no change there. Changing the ground check distance actually sorta fixes it, but doing that would cause more problems then it would solve. I would rather have it not slow down at all and be a smooth transition. How can I fix this?
     
  2. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,508
    You're probably going to have to show us, but the most likely answer to this is for you to animate the character to look like they're absorbing the shock of landing. You want the ground detection to be pretty short and the actual character position might thud against the ground (if you don't allow for bounce). Then the visual model or sprite of the character can "sell" the landing by bending the legs and ducking the upper body a little bit briefly. This is an exaggerated example.

     
  3. Kechrimpari

    Kechrimpari

    Joined:
    Apr 5, 2022
    Posts:
    56
    I currently don't have a way to record anything, but if I find an example somewhere online I'll link it. (It's also in first person, but I get what you mean.) Also, thanks. I'll have to try this out when I can.
     
  4. Kechrimpari

    Kechrimpari

    Joined:
    Apr 5, 2022
    Posts:
    56
    Well, turns out that fixing it is a LOT easier then I thought it was going to be, so sorry that you had to make a youtube video halley. If you give the player a physic material, you can apply the friction to be 0, or say 0.1. This makes the transition smooth, but it does mean you slide a little (but you can change drag on the rigidbody to accomodate with that).
    Thanks all!