Search Unity

"Player" goes backwards but I´m not pressing the "S" Key

Discussion in 'Physics' started by nunosantos12350, Apr 4, 2021.

  1. nunosantos12350

    nunosantos12350

    Joined:
    Jan 26, 2021
    Posts:
    5
    Hi.
    So, I was trying to make the physics of my "game", but when I put my script to the character so it can move with rigidbody, it just goes backwards. If I press W it will go forward but if I press nothing it will just go backwards endlessly.
    Help, I can´t find a solution for this and reinstalling Unity didn´t help me
     
  2. arfish

    arfish

    Joined:
    Jan 28, 2017
    Posts:
    782
    Hi,

    Perhaps you could increase the friction to prevent the player from sliding on steep roads.
     
  3. nunosantos12350

    nunosantos12350

    Joined:
    Jan 26, 2021
    Posts:
    5
    Thank you, I found the solution but I don´t remember what I did
     
  4. arfish

    arfish

    Joined:
    Jan 28, 2017
    Posts:
    782
    It maybe stopped walking when you released the "nothing key"?
     
  5. jack_65

    jack_65

    Joined:
    Apr 8, 2021
    Posts:
    8
    Resist the player with any kind of obstruction or applying friction might help