Search Unity

Clamp joint rotation with mecanim´s muscle system?

Discussion in 'Animation' started by calpolican, Jan 20, 2017.

  1. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    425
    I´m having a hard time limiting the joint movement for my characters (Quaternions are hard to clamp, and euler can´t have negative values, I couldn´t find a single code that worked).
    I want this for my IK system, to avoid unwanted rotations, pretty standard stuff. I even thought of phyisics character joints, but this isn´t a ragdoll, and I don´t have a rigidbody for each limb.
    Mecanim seems to have this feature build in though: "the muscle system". It allows you to limit rotations and preview the result, ain´t that wonderful?! but for some reson the people that design it aparently didn´t understand why they had to make it. The only use this is currently having is for retargetting animations, who knows why they didn´t extend the functionality. Is there any way I can see how this muscle clamping work? or is there a way in wich I can get this "muscle" restrictions to work with IK? (the latter being the prefered one). I´m thinking why redoing the whole thing when you have this already built in.
    PS: I know that you can limit rotations with an asset (final IK), I´m looking for a different solution.
     
    Last edited: Jan 20, 2017