Search Unity

Character Cloth Simulation in Unity 5

Discussion in 'Physics' started by Mohammad-Faisal-Aleem, Jun 22, 2015.

  1. Mohammad-Faisal-Aleem


    Jun 22, 2015

    It seems Unity have changed it's cloth physics in Unity 5. I want to add realtime cloth simulation to my character. Do I have to design my character by keeping in mind that it will have cloth simulation. Also I have read that cloth can only interact with sphere and capsule colliders. So if I have the cloth on my character's legs, how can I prevent it passing through them or other part of the body.
  2. MKDev


    Feb 19, 2015
    You need to add your sphere colliders to the 'Sphere Collider' section of the Cloth component. Only then will the cloth collide with the colliders.

    btw, in each slot of the 'Sphere Collider' section, you can enter one or two sphere colliders - if you add two, you will be creating a conical capsule collider instead.

    You may need to add lots of these colliders to make it behave in the way you want, as cloth will not collide with your characters skin, only the sphere colliders you add. Thus, for your characters legs, you need to add appropriate conical capsule colliders to cover them.

    Sphere colliders should be added to your characters bones, so character animation will also move the sphere colliders and conical capsule colliders. In this way, you can get the cloth working correctly (it always takes lot of tweaking).

    Michael Wildoer
    Lava Software P/L