Search Unity

Fastest way to create a pose

Discussion in 'Animation' started by MaryInvents34, Oct 12, 2013.

  1. MaryInvents34

    MaryInvents34

    Joined:
    Aug 28, 2013
    Posts:
    15
    Hi,

    I'm trying to control bones via script. What's the simplest way to create/edit a pose in Unity?

    Is there a way to save a character pose through mecanim?

    Cheers,

    Matt
     
  2. Jax_Cavalera

    Jax_Cavalera

    Joined:
    Jul 22, 2013
    Posts:
    44
    As I script using Uscript, I may not be able to help too much regarding specific lines of code that you should / could use but from my experience I've found that you can achieve the following things :

    You can use scripts that drive parameters you are using to control motion blends for Mecanim animations/poses. So if you are wanting a script to determine if your boned character turns left or right, then you would create the blend tree in Mecanim and add a Float variable called Direction which would have a value between -1.0 and 1.0.

    Then you would script so that the variable Direction is set to the desired value to control which specific pose the character is in from the poses you have created and applied to the Mecanim blend tree.

    As far as actually creating original Mecanim poses or editing them.. You would need an external program to achieve this if the goal is simple then you could check out this kit : http://forum.unity3d.com/threads/203298-Mecanim-Humanoid-Animation-Kit

    Alternatively for a more complex method that I can only guess would be very difficult to achieve in contrast, it seems that you are able to rotate bones by referencing them as explained a bit better in this topic : http://answers.unity3d.com/questions/327196/rotating-a-bone-via-scripts.html

    If the goal is to generate scripted, retargetable poses, that don't involve animation then you will likely have less difficulty than if you are wanting the poses to also be animated.

    Hope this helps.