Search Unity

Mirror Animation at runtime via c#

Discussion in 'Animation' started by TRuoss, Mar 18, 2015.

  1. TRuoss

    TRuoss

    Joined:
    Dec 5, 2012
    Posts:
    85
    Hi, i´m having an Human Avatar which can pose like an Photo model. To double the poses i added the ability to mirror the Avatar. I do it like most people with localPosition * -1 and it is working the way it should. BUT if i do it this way a can´t use the SetLookAtPosition() function anymore, cause it does not work with changed scaling.

    Recently i found a mirror button in the inspector at the AnimationState window (see picture). But i can´t find this function. Even the documentation does not help me.

    Does someone know how to access this function outside the inspector? Thx for any kind of help.

    42678-mirror-toggle.jpg
     
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    TRuoss likes this.
  3. TRuoss

    TRuoss

    Joined:
    Dec 5, 2012
    Posts:
    85
    thx for the info
     
  4. tsondhi2006

    tsondhi2006

    Joined:
    Sep 4, 2016
    Posts:
    10
    Hi, i have 2017.1.0f2. Can you tell me how to change it in runtime?