# Improve motion convert calculations

**URL:** <https://forum.babylonjs.com/t/improve-motion-convert-calculations/56974>\
**Category:** Questions\
**Tags:** animation, ai\
**Created:** [March 7, 2025, 10:13am UTC](https://forum.babylonjs.com/t/improve-motion-convert-calculations/56974 "2025-03-07T10:13:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Goh23](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/goh23/32/45413_2.png) [@Goh23](https://forum.babylonjs.com/u/Goh23)\
**Post date:** [March 7, 2025, 10:13am UTC](https://forum.babylonjs.com/t/improve-motion-convert-calculations/56974/1 "2025-03-07T10:13:51Z")

</div>

### Hello to all developers. I am creating an application for capturing movements and converting them into rotations. I want to improve the quality of 3d landmarks conversion.

Please advise what can be done, I use mmd models for animation. The conversion logic is here: [Akira-MMD/src/app/ui/logic/MotionModel.ts at master · GOH23/Akira-MMD · GitHub](https://github.com/GOH23/Akira-MMD/blob/master/src/app/ui/logic/MotionModel.ts)

* * *

You can test it here: [https://akirammd.vercel.app/](https://akirammd.vercel.app/)

* * *

I take into account every suggestion you make.  
I would be grateful if you help.  
The main problems:

- The moveBody method does not change the location along the x axis and produces conversion inaccuracies.

---

<div class="post-metadata">

**Author:** ![Goh23](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/goh23/32/45413_2.png) [@Goh23](https://forum.babylonjs.com/u/Goh23)\
**Post date:** [March 7, 2025, 11:22am UTC](https://forum.babylonjs.com/t/improve-motion-convert-calculations/56974/3 "2025-03-07T11:22:52Z")

</div>

Sorry for not providing the information properly(

---

<div class="post-metadata">

**Author:** ![evierosie](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evierosie/32/45388_2.png) [@evierosie](https://forum.babylonjs.com/u/evierosie)\
**Post date:** [March 8, 2025, 7:18am UTC](https://forum.babylonjs.com/t/improve-motion-convert-calculations/56974/4 "2025-03-08T07:18:33Z")

</div>

Your project looks interesting! For improving motion conversion, you might want to refine how you handle offsets along the x-axis—maybe add a correction factor or interpolation for smoother transitions. Have you tried using Inverse Kinematics (IK) to improve accuracy? I’ll check out the demo and share more thoughts!

---

<div class="post-metadata">

**Author:** ![Goh23](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/goh23/32/45413_2.png) [@Goh23](https://forum.babylonjs.com/u/Goh23)\
**Post date:** [March 10, 2025, 5:28am UTC](https://forum.babylonjs.com/t/improve-motion-convert-calculations/56974/5 "2025-03-10T05:28:58Z")

</div>

I’m sorry I answered you late. The method corrects the position of the model’s molars based on the detected body landmarks. It calculates the center between the shoulders and hips to determine the midpoint of the body. Using the average height of the ankles and predefined scaling factors, it calculates the target position of the molar (for example, “センター” or “全の親”). The position is smoothly interpolated using the LERP coefficient to ensure natural movement. Could you rewrite one of the methods using inverse kinematics for understanding, please?

---

<div class="post-metadata">

**Author:** ![Goh23](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/goh23/32/45413_2.png) [@Goh23](https://forum.babylonjs.com/u/Goh23)\
**Post date:** [March 13, 2025, 7:38am UTC](https://forum.babylonjs.com/t/improve-motion-convert-calculations/56974/6 "2025-03-13T07:38:47Z")

</div>

I fixed moveBody method
