Answered

Can't set "Visibility" to "Show"

laurenz 4 years ago updated by Peter - Soxware Developer 4 years ago 3

I am trying to make my character grab an object with the hand. I added the object to the Umotion project and want to set up a "Child of Constraint" like it is explained in the tutorial video. First I need to set the "Visibility" in the Properties to something other than "Locked" so I can add a constraint to my object. This step does not work though, I get the message: "Animating generic objects that have no humanoid bone in their parent hierarchy is not supported." 

Image 117


This doesn't seem to be the case in your video, where no parent has humanoid bones: 

Image 116

Also I don't want the object to be part of the skeleton hierarchy because then it would be moving even without my character grabbing it.

How would I go about this problem?

-Thank you!

UMotion Version:
1.20p5
Unity Version:
2019.2.0

Answer

Answer
Answered

Hi,

thank you very much for your support request.

The reason why this doesn't work for you is because in my video, the cube is a child of "Root" which is defined as "Hips" bone in the humanoid avatar.


Even if you would make the cube a child of the "christine" (your root transform) transform, the cube would still move with your character in-game when root motion is enabled. This is because root motion is moving your whole GameObject.


If you want to create something like "picking-up" a world space object it's probably a better idea to use a script (combined with animation events) that parent's your object to your characters hands in the right moment. Or you can include a duplicated version of your object that is already a child of the hand and make that visible in the right moment (using a Custom Property constraint to animate the GameObject.active property).


Another method: When your object is a child of your humanoid hips bone, you could use the child-of constraint and parent it to the "christine" transform. This parenting is only "virtual" (it's just acting as if, not really changing the hierarchy) and because in UMotion the root motion is applied on the hips bone, it would effectively keep the cube in place (by generating an animation curve that is inverse to the root motion, thus canceling it's effect).


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


Best regards,
Peter

GOOD, I'M SATISFIED

very quick support and in depth answer to my question, great!

Satisfaction mark by laurenz 4 years ago
Answer
Answered

Hi,

thank you very much for your support request.

The reason why this doesn't work for you is because in my video, the cube is a child of "Root" which is defined as "Hips" bone in the humanoid avatar.


Even if you would make the cube a child of the "christine" (your root transform) transform, the cube would still move with your character in-game when root motion is enabled. This is because root motion is moving your whole GameObject.


If you want to create something like "picking-up" a world space object it's probably a better idea to use a script (combined with animation events) that parent's your object to your characters hands in the right moment. Or you can include a duplicated version of your object that is already a child of the hand and make that visible in the right moment (using a Custom Property constraint to animate the GameObject.active property).


Another method: When your object is a child of your humanoid hips bone, you could use the child-of constraint and parent it to the "christine" transform. This parenting is only "virtual" (it's just acting as if, not really changing the hierarchy) and because in UMotion the root motion is applied on the hips bone, it would effectively keep the cube in place (by generating an animation curve that is inverse to the root motion, thus canceling it's effect).


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


Best regards,
Peter

Thank you for your quick response, your support is great!

I looked at what you said and I am pretty sure that my object is also a child of root. At least in the unity hierarchy, if that is what you mean. So maybe I still don't quite understand it, the only way I can set my object to "Show" in the properties is if I make it a child of hip, or anything else in the actual skeleton hierarchy. In your video, the object appears to be above the hips but maybe I am wrong and the way you set up the humanoid avatar is different.

I think going with the last method where I parent it to the upper most transform when it shouldn't move works well for me.

Thank you for taking your time and offering multiple solutions!

Laurenz


Hi Laurenz,

I think the thing that causes the confusion is that the bone named "root" is assigned to the "hips" field in the Robot Kyle humanoid avatar (thus making it a humanoid bone). In your case "root" seems not to be assigned to the "hips" field in the humanoid avatar (thus being not a humanoid bone).

"I think going with the last method where I parent it to the upper most transform when it shouldn't move works well for me."

Great to hear that this works for you, don't hesitate to contact me in case you have troubles with this method.

Best regards,
Peter