Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Help with playercontroller

Discussion in 'Physics' started by Baybird, Jan 26, 2020.

  1. Baybird

    Baybird

    Joined:
    Jan 23, 2020
    Posts:
    6
    I have this recurring problem where when i jump while pressed up against a wall, i just kinda shake up and down. it only does this at a plane intersection, so like, the top of a cube. If i jump and reach the intersection of the top and side of a cube i just stops me from jumping past it by shaking me around. Any help?

    - Thanks in advance!
     
  2. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,850
    Try making a frictionless PhysicsMaterial and see if it still happens.
     
  3. Baybird

    Baybird

    Joined:
    Jan 23, 2020
    Posts:
    6
    It still happens, but i did figure out that setting the max step height to 0 fixes this, this would be fine except that i kinda want to be able to walk up stairs in my game. Any tips?
     
  4. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,850
    Yes..tag the stairs and when you collide with them on the forward Z axis at stairStepHeight above the CC base pivot or below then Translate(Vector3.up*stairStepHeight).
     
  5. Baybird

    Baybird

    Joined:
    Jan 23, 2020
    Posts:
    6
    Is that really the only solution? Not to downplay on your help, your help has been great but, i feel like there's a simpler solution here.