Answered

Child GameObject in humanoid rotates and moves unexpectedly

_alphaBeta_ 12 months ago updated by Peter - Soxware Developer 12 months ago 3

I have a GameObject (LOD Group if that matters with five LOD children) parented to my model's lForearmBend bone. This was added in Unity by modifying the model's prefab. The Pose Editor's config mode picked up the change and updated the rig, and I exposed the ability to animate the position and rotation of this GameObject in configure mode. Everything looks good in Pose Mode, but after exporting the clip, this GameObject behaves unexpectedly. The rotation and position changes almost seem like they're relative to another parent. As a test, in the pose mode, I'm keying in the position of this GameObject to go (unrealistically) straight up way above the humanoid. When this plays in a scene after export, it veers off to the side while also going up and the object rotates, but doesn't match the pose mode I keyed. I applied the child constraint as another test to enforce the parenting, but the result was the same. I'm doing something wrong with this child object. Any ideas?

The rest of the humanoid animation, outside this child I manually added, is working fine.

UMotion Version:
1.29p02
Unity Version:
2021.3.26f1

Answer

Answer
Answered

Glad to hear that you've found a working solution for your issue. Don't hesitate to contact me in case you need any further assistance :-)

Best regards,
Peter

Under review

Hi,
thank you very much for your support request.

Could you make a screen recording (video) to illustrate your issue (please show as much information as possible)? This would make it easier for me to precisely understand your situation.

Thank you very much.


Bets regards,
Peter

I admittedly typed this up after working the issue for hours and it was getting pretty late. Appreciate your response and trying to make sense of it.

I believe I have a workaround, so I won't bother you further with a video etc. Put another way, imagine a watch on the wrist with the face up aligned with the top of the palm and parented to the forearm. It would stay in that orientation while I moved shoulders and forearm bones around in the pose editor just fine (approaching limits of what humans can do). The exported clip, when played in a scene via a controller, would result in the watch not keeping that orientation and would rotate into the model etc. So I was (and still a little am) confused why the pose editor and the animation playing in the scene didn't match. Again, this "watch" in this example was an external GameObject added in Unity after model import. From some subsequent reading, I think what's happening is there's some rotational error coming from some of these motions when considering Unity's animation systems, the model, and avatar etc.

For now, I'm just going to parent objects to the hip and manually animate them to move with the arms. The end result should be the same, and I was probably going to need the tweak the rotation and position anyway regardless of the parent.

Answer
Answered

Glad to hear that you've found a working solution for your issue. Don't hesitate to contact me in case you need any further assistance :-)

Best regards,
Peter