Search Unity

Question Enabling self-collision with a SkinnedMeshRenderer.

Discussion in 'Physics' started by Creiz, Jun 25, 2022.

  1. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    130
    Basically, I have a character with blendshapes. People can make their character tall, short, thin, fat, etc...

    I also have an idle pose (and much, much more).

    The problem is that in the idle pose, if I make a fat character, the arms will clip inside the mesh.

    I want to somehow make those arms follow the blendshape, and make it *not* clip inside the mesh, instead resting how it normally would look but on a fat character.

    Right now I'm doing this manually with different idle animations for each blendshape and blending them in the Animator, but hell, I have DOZENS of animations to process and like ten body blendshapes.

    That means hundreds of animations, parameters, blends, etc.

    I figure this could be solved procedurally with physics but I don't see any solution for it.

    Help, please.
     
  2. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    868
    There is no out of the box solution in Unity. You either need to buy an asset or use some GitHub project, or build it yourself. This involves setting up collider, setting up joints, and build a script for the physics character to follow animation character, using two SkinnedMeshRenderer.
     
  3. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    130
    Do you happen to know of such a solution?
     
  4. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    868
    Creiz likes this.
  5. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    130
    Thanks a lot, mate. It's a start!