Answered

Child-Of Constraint

Robin 5 years ago updated by Peter - Soxware Developer 3 years ago 7

hi i've just bought this great software thanks

but i'am having trouble understanding the child of constraints

so i think it needs to be part of my character ?

not a bone?

so i dragged a cube onto my character

 

i added a child of constraint in the config mode turned off ik pinning mode

in pose mode i added the cube

should i now be able to move the cube to move the arm?

if so i cant select the cube

i looked at the example project but could t get any help from there.

on a side note in the forum it says 200 plus topics but i can only see the first 10 or so is there away to see them all

thanks 


UMotion Version:
latest
Unity Version:
2019 3.6f

Answer

Answer
Answered

Hi,
thank you very much for your support request.

When your project is of type humanoid, only the humanoid bones are visible by default. You can enable the bones/transforms of generic objects (like your cube) by switching into "Config Mode". Then select the cube (in the "Rig Hierarchy") and in the "Properties" tab set "Visibility" to "Show".



The "PickUpAnimation.asset" example project uses the Child-Of constraint on a cube. You can take it as an example.


Please also watch the child-of video tutorial:

"on a side note in the forum it says 200 plus topics but i can only see the first 10 or so is there away to see them all"

I'm sorry this was my fault. The "paginator" at the bottom has been disabled. I've enabled it now. You can also use the search bar to search for specific issues.

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

Best regards,

Peter

GOOD, I'M SATISFIED

hi thanks for your help and speedy reply i've watched the tutorial several times i'm getting the hang of it 

i've managed to get a character  to pick up a box then let it go

i think i was expecting to see the child object change from my characters hand to none in the timeline

or some where i see there is a parent 

it does if you let go of the time scrubber i was just dragging it past the keys and expecting them to change 

so now on i go

the only problem is if my character walks then picks up an object i take it i would need 2 different anims (which is fine) 

as if he's walking the box as its part of his bones would move with him ?

i really love this software the bit that makes it so good for me is the muscle groups i could mostly animate just with that i wish there was one for arms?

thanks again this really is a fantastic job you've done 

my only complaint is i have to add it to my project come on unity buy this fantastic software so its just par of unity

Satisfaction mark by Robin 5 years ago
Answer
Answered

Hi,
thank you very much for your support request.

When your project is of type humanoid, only the humanoid bones are visible by default. You can enable the bones/transforms of generic objects (like your cube) by switching into "Config Mode". Then select the cube (in the "Rig Hierarchy") and in the "Properties" tab set "Visibility" to "Show".



The "PickUpAnimation.asset" example project uses the Child-Of constraint on a cube. You can take it as an example.


Please also watch the child-of video tutorial:

"on a side note in the forum it says 200 plus topics but i can only see the first 10 or so is there away to see them all"

I'm sorry this was my fault. The "paginator" at the bottom has been disabled. I've enabled it now. You can also use the search bar to search for specific issues.

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

Best regards,

Peter

In response to the text in your satisfaction mark:


"the only problem is if my character walks then picks up an object i take it i would need 2 different anims (which is fine)

as if he's walking the box as its part of his bones would move with him ?"

If you want to pick up something during run-time, you could also (and that's probably the most common way) use a simple parenting script (see transform.SetParent()).

"i really love this software the bit that makes it so good for me is the muscle groups i could mostly animate just with that i wish there was one for arms?"

I'm not sure if sliders are a benefit for the arms. I think using the rotation gizmo gives you more precise control. Most people are using IK for the arms anyway (in that case sliders can't be used as the bones are solely driven by the IK target/pole target).

Thanks for the nice words. I really appreciate it.

Best regards,

Peter

thanks peter

If I have a sword to held by the hand then I have to decide whether the sword starts in hand or it is picked up.

When the sword starts in the hand then it can be childed to the hand in the Unity hierarchy and FK will work but then in Ik the sword is not. Trying to fix this for IK ill cause the loop reference problem.

Placing the sword at the root will enable IK and child of constraint to work but then the sword has to be dropped as the character has to walk away from it but the Umotion processes are sill connected to it.

Is my thinking way off here concerning the Umotion IK process?

In the current setup I still can not get the hand to remain in line with the fore arm by using the IK pinning.

In this current effort I am spending too much time traversing videos and the manual to try to find the explicit answers to this set up I am trying to achieve.

When the sword starts in the hand then it can be childed to the hand in the Unity hierarchy and FK will work but then in Ik the sword is not. Trying to fix this for IK ill cause the loop reference problem.
  1. Make the sword a child of the right hand of your character outside of UMotion. Adjust it's position so that it perfectly fits into the hand.
  2. Create a new UMotion project, assign the character to it and run the IK setup wizard.
  3. Stay in config mode, select the left hand IK target and in the constraints tab disable the "IK Pinning" mode of the child-of constraint. That way you can select an arbitrary parent (instead of the pinned/not pinned toggle).
  4. Keep the visbility of the sword transform as "locked", so that no animation curve is generated for the sword.
  5. In pose mode, create your two-handed grab pose.
  6. Select the left IK handle, and in the channels view of the pose editor, set the parent to be the right IK handle.
  7. Create Keys for everything (make sure you're on frame 0). Now if you move the right IK handle, the left handle follows.
  8. Create your animation.

For dropping and picking up, you would use a script that adds/removes the sword from your character's hierarchy in the right moment. You can use animation events to trigger these actions from your animation.

Regarding the reference loop:

Just make sure that your IK handles are not a child of a bone that is affected by the IK itself.

Placing the sword at the root will enable IK and child of constraint to work but then the sword has to be dropped as the character has to walk away from it but the Umotion processes are sill connected to it.

Please note that UMotion isn't executed at runtime. It's the animation clip and unity's animation system or the regular transform hierarchy that are still controlling the sword. You need scripting to detach it.

Hope that helps. Let me know if you have any follow-up questions.

Best regards,
Peter

This one got missed:

In the current setup I still can not get the hand to remain in line with the fore arm by using the IK pinning.

This one got missed:
In the current setup I still can not get the hand to remain in line with the fore arm by using the IK pinning.

If you don't want your forearm to be rotated by the IK you can create an IK setup that is not having the forearm in the IK chain. I'm wondering why you want to do that (the result might look very robotic/unnatural)?

Please check out the IK video tutorial how to setup IK chains manually. Also check out the manual for a documentation about the IK constraint.

Answer: https://support.soxware.com/en/communities/1/topics/961-locking-hand-rotation-to-forearm

Best regards,
Peter