Search Unity

Character Controller - > Slopes

Discussion in '2D' started by obscene, Dec 1, 2013.

  1. obscene

    obscene

    Joined:
    Oct 26, 2013
    Posts:
    34
    Ok so I am using the character controller pretty much as is, just took off the z movement so strictly left and right. Threw on box colliders onto my ground tiles and now I can walk. However I have a slope sprite that is a right triangle. No way to make a triangle collider as far as I can tell. I figured I can rotate a square block with a box collider and make a slope, but that just kinda seems sloppy and I cant piece my tiles together right that way.

    What am I missing?
     
  2. Mogitu

    Mogitu

    Joined:
    Nov 13, 2013
    Posts:
    40
    try polygon collider
     
  3. obscene

    obscene

    Joined:
    Oct 26, 2013
    Posts:
    34
    I think I did, but it's a box2D collider and the character controller collider drops right through it.
     
  4. Mogitu

    Mogitu

    Joined:
    Nov 13, 2013
    Posts:
    40
    Are you sure all colliders are 2d colliders?
     
    Last edited: Dec 2, 2013
  5. mark-velthuis

    mark-velthuis

    Joined:
    Feb 10, 2011
    Posts:
    47
    I believe the character controller is a 3D physics component. I don't know if that will work with 2D physics. I haven't found a 2D character controller yet.
     
  6. Mogitu

    Mogitu

    Joined:
    Nov 13, 2013
    Posts:
    40
    correct, 3d physic components do not work with 2d physic components.