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

Alternative to using two capsule colliders for player?

Discussion in 'Physics' started by dgoyette, Dec 24, 2018.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    I have a fairly standard approach to managing colliders for my player characters. The main issue is that I want friction in the player's feet, but I generally don't want friction on the player's body. (Body friction causes the player to get stuck on walls.) So, my player looks something like this:

    upload_2018-12-24_11-11-51.png

    The "tall" collider is the player's feet, and it has a distinct Physic Material from the "wide" collider, which is the player's body. This mostly works fine, but it can lead to some slight issues at time, like how there's a notch where the Feet and Body colliders meet.

    Anyway, I was wondering how others approached this. The two concerns again are:
    • The feet need high friction in order to not slide around.
    • The body needs basically zero friction so that if a player runs parallel to a wall, they don't get slowed down by brushing against the wall.