Answered

Apply transform after callback

Anonymous 1 month ago updated by Peter - Soxware Developer 2 weeks ago 5

Through the callback function, I can mirror the whole pose, including single bones(hips, waist...). However, there is a problem that the modified position and rotation will not be saved in the key frame, so there is no way to apply interpolation.

Please consider adding such a feature, which can greatly improve the scalability of umotion.

Thank you.

UMotion Version:
1.26
Unity Version:
2021.2.5

Answer

Answer
Answered

Hi,
thank you very much for your feature request. Much appreciated.

I get your point. I've put it on my to-do list and might implement that in the next update.

Best regards,

Peter

Answer
Answered

Hi,
thank you very much for your feature request. Much appreciated.

I get your point. I've put it on my to-do list and might implement that in the next update.

Best regards,

Peter

Hi Peter,

Thank you for your reply. It would be better if we could update the transform in keyframe through API(something like UMotion.ApplyTransform...).

I was thinking about something like the following, would that work for you use-case?

bool PoseEditor.TrySetFkLocalPosition(Transfrom transform, Vector3 localPosition, bool createKey);
bool PoseEditor.TrySetFkLocalRotation(Transfrom transform, Quaternion localRotation, bool createKey);
bool PoseEditor.TrySetFkLocalScale(Transfrom transform, Vector3 localScale, bool createKey);


Setting the "createKey" to true would automatically create a key for the changed position/rotation/scale. While leaving it at false would only modify the bones (they would turn red) and the UMotion user would need to manually create key frames for the change.

Best regards,
Peter

Great. That's what we need. Thank you!

Hey,

sorry that it took so long. UMotion V1.28 adds what you've requested (and more): https://forum.unity.com/threads/umotion-animation-editor.490618/page-13#post-7801521 Best regards, Peter">https://forum.unity.com/threads/umotion-animation-editor.490618/page-13#post-7801521

Please note that the methods to manipulate the FK pose can not be called from within the UMotion callback as that would result in an endless loop. Instead, add a menu item to the clip editor or a button to the pose editor to trigger your custom mirroring script. You can also manipulate the frame cursor via the new API so you could loop over the complete animation clip and mirror it.

Let me know how this works for you.

Best regards,
Peter