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

SOLVED -- 2d "ice" or slippery material

Discussion in 'Physics' started by Sydious, Mar 12, 2015.

  1. Sydious

    Sydious

    Joined:
    Apr 1, 2010
    Posts:
    172
    I am trying to create a "rail slide" type effect for my 2nd platformer. I have followed many of the practices in the offical 2d tutorials as far as my character controller goes.

    I want to add the ability for the character to slide down angled surfaces. I added a physicsmaterial2d to a box collider and set he friction and bounce to 0.

    The char game object does slide down but at a very slow rate.

    I am sure this may be difficult question to answer outright since physics are involved. This is really my first time going about a char controller using physics alone and I am sure I have something set wrong.

    The project setting 2dphysics gravity has been set to Y = - 30 based on the official tutorial recommendation.

    Char object has a circle collider2d / rigidbody2d.
    • The Char Obj's
      • Gravity Scale = 2
      • Linear Drag = 0
      • Angular Drag = .05
      • Fixed Angle
      • Is kenematic = false.
    Anyone know what I might need to do to speed up my slide?
     
    pravinbudharap likes this.
  2. Sydious

    Sydious

    Joined:
    Apr 1, 2010
    Posts:
    172
    After a day of troubleshooting I realize that using the offical tutorial method of building the 2d char controller is based around using Input.getAxis. That means the velocity was being set when the axis was zero. Hence the slow slide. I coded around that and now it slides so fast I am thinking I need to slow it down now!
     
  3. antischaap

    antischaap

    Joined:
    Mar 29, 2014
    Posts:
    1
    he could u tell me how u worked around that axis problem ..i am having the same issue you had