Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Character can't jump

Discussion in 'Physics' started by ktotoetoia, Aug 25, 2023.

  1. ktotoetoia

    ktotoetoia

    Joined:
    Sep 21, 2021
    Posts:
    6
    When my character moving to the wall, it can't jump.



    I figured out its because of friction, but I'm not sure how to fix it. Friction is needed for my character to stay on sloped surfaces without sliding down, so I can't just set friction to default. I find two solutions, but they both have issues. The first is to create separate tile maps for slopes and flat surfaces, and set different PhysicsMaterials2D, the second is to use empty gameobjects with colliders instead of the tile collider.
     
  2. ktotoetoia

    ktotoetoia

    Joined:
    Sep 21, 2021
    Posts:
    6
    I temporarily fixed it by setting the physics material to zero friction and moving the character transform up while jumping.
     
    Last edited: Aug 26, 2023
  3. Funtik63

    Funtik63

    Joined:
    Apr 29, 2022
    Posts:
    9