Answered

VR IK

Jim 4 years ago updated by Peter - Soxware Developer 4 years ago 4

Lev,I would like to work on hand rotations/Grips on a two handed object that has been tracked in VR like for example a baseball bat. I can get the tracker data in by recording its movement and playing it back in unity whilst recording an anim of a humanoid being posed by Final IK's VRIK based on the trackers motion. I do not want to repeat this at runtime, but to perfect the animation in Umotion of wrists etc. Trouble is I cant seem to IK or parent the second hand to an object held in the other hand. Can you give me any hints ? I tried to find a way to copy the coordinates (Keys) of the bat held in one hand and pase them to FK/IK movement in the other hand's data, but when I paste the keys they only paste the X axis (Red Curve ) and lose the z axis and y axis data.on the keys I Cant understand why could this be a bug? Otherwise is there a way to copy the local positions on one hand and paste into  a new transform on the root object using the root's co ordinates? 

UMotion Version:
1.23
Unity Version:
2019.3.10f1

Answer

Answer
Answered

Hi Jim,

thank you very much for your support request.

Just assign a child-of constraint to the IK handle that you want to parent to the baseball bat.


In case you used the IK Setup Wizard to setup your IK constraints, a child-of constraint is already assigned to the IK handles (used for IK pinning). Just disable the IK pinning mode (go into config mode --> select the IK handle --> open the constraints tab --> scroll to the child-of constraint --> disable the check mark for the IK pinning mode).


With a child-of constraint, you can change the parenting during your animation. You can also parent the IK handle to the baseball bat directly in config mode via the "Parent" field in the "Properties" tab (this changes the hierarchy and is thus applied for the whole UMotion project).


For more information regarding the child-of constraint, please checkout the following video tutorials:


Please let me know in case you have any follow-up questions.


Best regards,

Peter

Answer
Answered

Hi Jim,

thank you very much for your support request.

Just assign a child-of constraint to the IK handle that you want to parent to the baseball bat.


In case you used the IK Setup Wizard to setup your IK constraints, a child-of constraint is already assigned to the IK handles (used for IK pinning). Just disable the IK pinning mode (go into config mode --> select the IK handle --> open the constraints tab --> scroll to the child-of constraint --> disable the check mark for the IK pinning mode).


With a child-of constraint, you can change the parenting during your animation. You can also parent the IK handle to the baseball bat directly in config mode via the "Parent" field in the "Properties" tab (this changes the hierarchy and is thus applied for the whole UMotion project).


For more information regarding the child-of constraint, please checkout the following video tutorials:


Please let me know in case you have any follow-up questions.


Best regards,

Peter

Thanks for a speedy reply Lev. So I now have the child of constraint set up properly (Without the Ik Pinning- thanks.)and can move the hand to the parent(bat),by blending to IK but the rotation also changes to the parent(bat, I think) and is unchangeable( always reverts to same). Is the idea then to add a transform to the parent and use that as a parent instead for the hand but adjust the new  transform's rotation relative to the original parent(bat) as required? 


I think I solved the problem with copying keys and losing x y axes data on paste. I was copy pasting the keys directly in the dopesheet instead of using copy /paste on the move/rotate tools. However can only do that for a single frame . Is it possible to copy paste a number of keys to another transform without losing the z/y/ axes?

Update So the rotation of the ik handle issue(not working) seems to be that by default a chain mask is placed on all the bones in the IK chain that prevent rotation and by changing chain mask to nothing rotation is enabled.  

So my final issue is:

"I think I solved the problem with copying keys and losing x y axes data on paste. I was copy pasting the keys directly in the dopesheet instead of using copy /paste on the move/rotate tools. However can only do that for a single frame . Is it possible to copy paste a number of keys to another transform without losing the z/y/ axes? "

Copy & pasting keys in the dope sheet should copy all components (x, y, z). Only if you have disabled the "Chain Neighbour Keys" in the Project Settings (and have removed some x, y or z keys from the animation curve of the property you want to copy), then only the existing components are copied.

Also please note that all keys store local positions/rotations (i.e. relative to their parent). Copy and pasting the keys from one bone to another does not copy the world space position/rotation.

Using the tool assistant, you can only copy&paste the current position/rotation/scale. It is not possible to do this automatically across multiple frames.

Let me know if this explains your situation or if you need further assistance.

Best regards,
Peter