Answered

Generic Object moves in animation before applying child of constraint

Elsiehar 2 months ago updated by Peter - Soxware Developer 3 weeks ago 5

I am trying to get my character to pick up an tablet.  It seems to work okay when the tablet is on the table, but as soon as I add the right hand as my Parent it moves the tablet in the animation before this, even though the parent is still showing as None.  Hopefully the screenshots explain it.

Original set up and tablet location

After applying child of constraint

After the start of the animation after applying child of constraint.

I thought IK Pinning might work but when I try that the Parent option isn't available anymore.

Is there a step that I am missing?

Thank you

UMotion Version:
1.26 p02
Unity Version:
2020.3.12

Answer

Answer
Answered

Hi,

thank you very much for your support request.

When switching the parent of a child-of constraint, 2 key frames are created. One with the position/rotation values relative to the new parent and exactly one frame before UMotion automatically creates position/rotation keys relative to the old parent. 

It's a bit hard to tell from the screenshot in which order the keys have been created, but it looks like the keys on frame 0 have been created relative to parent "A" but then the parent channel was keyed for parent "none" (on frame 0) thus the position/rotation keys  are in the wrong coordinate space?


Please check-out the official child-of video tutorial to learn how the child-of constraint works:

I thought IK Pinning might work but when I try that the Parent option isn't available anymore.

IK Pinning is an option of the child-of constraint and is used in conjunction with an IK handle (an IK constraint). This option is simply a replacing the arbitrary parent selection input field with a check box, where ticking the checkbox makes the IK handle relative to world-space. You do not need IK pinning in your case. More information can be found in this video tutorial: 

If after watching the child-of video tutorial, you still think that there is something wrong going on, would it be possible to record a video where you do the same steps as shown in the screenshots so that I can see exactly what's going on? That makes it easier for me to identify if this is a bug or not.


Thank you very much.


Best regards,
Peter

Answer
Answered

Hi,

thank you very much for your support request.

When switching the parent of a child-of constraint, 2 key frames are created. One with the position/rotation values relative to the new parent and exactly one frame before UMotion automatically creates position/rotation keys relative to the old parent. 

It's a bit hard to tell from the screenshot in which order the keys have been created, but it looks like the keys on frame 0 have been created relative to parent "A" but then the parent channel was keyed for parent "none" (on frame 0) thus the position/rotation keys  are in the wrong coordinate space?


Please check-out the official child-of video tutorial to learn how the child-of constraint works:

I thought IK Pinning might work but when I try that the Parent option isn't available anymore.

IK Pinning is an option of the child-of constraint and is used in conjunction with an IK handle (an IK constraint). This option is simply a replacing the arbitrary parent selection input field with a check box, where ticking the checkbox makes the IK handle relative to world-space. You do not need IK pinning in your case. More information can be found in this video tutorial: 

If after watching the child-of video tutorial, you still think that there is something wrong going on, would it be possible to record a video where you do the same steps as shown in the screenshots so that I can see exactly what's going on? That makes it easier for me to identify if this is a bug or not.


Thank you very much.


Best regards,
Peter

Sorry for the slow reply, I have only just had a chance to look at this.  When I opened it up again it seems to be working (I didn't change anything).  I have however noticed that it has changed the Parent from "none" to "Daughter" when the tablet is sitting on the table.  I have watched the child of constraint video many times and it is "none" when the cube is just sitting on the table?  I could re-do it and most likely reproduce the error but do you see any issues with the way it is currently set up?

Thanks

I have however noticed that it has changed the Parent from "none" to "Daughter" when the tablet is sitting on the table.
  • "None" means, use the actual parent (i.e. don't override it).
  • "Daughter" means relative to the root game object. This acts as if the tablet stays at it's world space position (as the root is not moved).

In case of the child-of tutorial, the cube was setup to be a child of the root by default. Thus "none" and "Robot Kyle" ("Daughter" in your case) would have acted the same.

I hope that explains it to you. Let me know if not.

Best regards,
Peter

Okay, I am not sure why none didn't work but it seems to be working okay now.

Thank you

Glad to hear that it's working for you now.

Don't hesitate to contact me in case you have any other questions.

Best regards,

Peter