Search Unity

Controlling a rigged hand using sliders

Discussion in 'Animation' started by SteveJJ, Aug 12, 2021.

  1. SteveJJ


    Apr 28, 2021

    I am completely new to Unity but have some experience with blender and no coding knowledge (yet!). I have created a rigged hand in blender where all the joints move nicely putting the hand into different poses. Now I want to create something in unity that would enable me to control movement at each of the joints using sliders. I think it can be done with animations but I wonder if there is a way to directly link the position of a slider to the angle at a given joint in the hand.

    Thanks in advance

  2. Wardaddy182


    Nov 11, 2016
    I'm not a pro but...
    If you want to create animations from this you could use the Animation window. You can find it at Window/Animation/Animation or pressing Ctrl+6

    But if you really want just to mess around the bone rotations with sliders, I guess you could:
    Create a script;
    Declare public GameObject variables for the bones;
    Then you would be able to get all the bone references from the hierarchy into your script;

    To see sliders on your inspector you declare the angle variables like this:
    [Range(0f, 90f)]//Where 0f and 90f are min and max float values you can determine
    public float boneOneAngle;

    Now you have to use the variables to change the bones rotations.
    Something like:
    boneOne.transform.rotation = ...
    For that you should take a look into Quaternions.

    PS If you have animations playing you will have to do this in LateUpdate so your changes can "override" the animations which are calculated on Update.
    Last edited: Aug 15, 2021