Search Unity

Question How to recalculate rig transforms

Discussion in 'Animation Rigging' started by nukadelic, Sep 1, 2022.

  1. nukadelic

    nukadelic

    Joined:
    Aug 5, 2017
    Posts:
    78
    Got a two bone IK setup for the arm and the forearm , my script is checking for the vr controller distance to the target object and will rotate the shoulder bones. It seems that the RigBuilder will remember the initial bone rotations that are not effected by the rig constraints and will ignore any changes - those when i rotate my shoulder the target ik will be way off. I did find a way around it when calling RigBuilder.Build() however it is very slow to invoke this method on every frame. How do i manually update the jobs catched rotation ( if there are any at all ) ?
     
  2. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Is your shoulder part of your two bone ik constraint ?

    If it's not the case, then add a RigTransform component to this GameObject. It will make sure the manipulations you make to this GameObject carry over to the animation stream and the constraint itself.