# Blender Mesh + RapierJs Colliders results in weird mesh issues

**URL:** <https://discourse.threejs.org/t/blender-mesh-rapierjs-colliders-results-in-weird-mesh-issues/86683>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [September 4, 2025, 1:39pm UTC](https://discourse.threejs.org/t/blender-mesh-rapierjs-colliders-results-in-weird-mesh-issues/86683 "2025-09-04T13:39:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattvb91](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mattvb91/32/59710_2.png) [@mattvb91](https://discourse.threejs.org/u/mattvb91)\
**Post date:** [September 4, 2025, 1:39pm UTC](https://discourse.threejs.org/t/blender-mesh-rapierjs-colliders-results-in-weird-mesh-issues/86683/1 "2025-09-04T13:39:29Z")

</div>

Hi everyone,

I’ve created a small demo for making ragdolls with a blender mesh and rapierjs. However I am having an issue where the mesh seems to be scaled in a weird way that I cant find the cause of.

I have the following armature & Mesh in blender:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/0/0/00a1f45378808a484cc79573bf9fd5d534add40b.jpeg)

but when I activate the colliders to sync the mesh it ends up looking like this:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/d/f/df05152902961b6901e9b5768bcd26a7111d98ea.jpeg)

This leads me to think that the arm colliders are in the wrong orientation due to the weird looking mesh. However also the scaling of the mesh is off completely.

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/8/a/8a231b5da7f45304e486b14718201e419496119f.png)

What i’ve tried so far:

- Check normals in blender
- Orient the bones in blender
- Rotate the rapierjs colliders initially to apply a 90C offset in +/- to see if it fixes

Has anyone had any similar issues applying rapierjs collider data to bone positions in threejs? Code + Blender file can be found here: [rapierjs-ragdoll/src/Ragdoll.ts at 2dd492a0fc8e19d8e3473fe074d00e9f97fff195 · mattvb91/rapierjs-ragdoll · GitHub](https://github.com/mattvb91/rapierjs-ragdoll/blob/2dd492a0fc8e19d8e3473fe074d00e9f97fff195/src/Ragdoll.ts)

Would appreciate any pointers.

---

<div class="post-metadata">

**Author:** ![manthrax](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/manthrax/32/2596_2.png) [@manthrax](https://discourse.threejs.org/u/manthrax)\
**Post date:** [September 4, 2025, 4:30pm UTC](https://discourse.threejs.org/t/blender-mesh-rapierjs-colliders-results-in-weird-mesh-issues/86683/2 "2025-09-04T16:30:28Z")

</div>

The main pointer I can give is that this is a super finicky process, and full of nightmare fuel style bugs.  
I ended up writing a whole rigid body exporter for blender to get my ragdolls to match up.. at least then I could do set it up in blender and test it there first before importing.

but for doing it in purely threejs I would say:  
pause your simulation, and make sure that the cubes+bones are lined up perfectly first.. scale/adjust the skinnedmesh until it is lined up. (You may have to adjust your ragdoll rig too.)  
Then on each rigidbody box, use .attach( to bind its corresponding skinnedmesh bone to it.

---

<div class="post-metadata">

**Author:** ![mattvb91](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mattvb91/32/59710_2.png) [@mattvb91](https://discourse.threejs.org/u/mattvb91)\
**Post date:** [September 4, 2025, 4:38pm UTC](https://discourse.threejs.org/t/blender-mesh-rapierjs-colliders-results-in-weird-mesh-issues/86683/3 "2025-09-04T16:38:54Z")

</div>

haha yup its definitely been finicky to get to this point. Thank you very much for the pointers will take a look and report back if I have any success

---

<div class="post-metadata">

**Author:** ![mattvb91](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mattvb91/32/59710_2.png) [@mattvb91](https://discourse.threejs.org/u/mattvb91)\
**Post date:** [May 3, 2026, 10:55am UTC](https://discourse.threejs.org/t/blender-mesh-rapierjs-colliders-results-in-weird-mesh-issues/86683/4 "2026-05-03T10:55:41Z")

</div>

Threw claude at this and it managed to actually fix it pretty quickly:

The code is here: [Fix blender mesh sync issue by mattvb91 · Pull Request #5 · mattvb91/rapierjs-ragdoll · GitHub](https://github.com/mattvb91/rapierjs-ragdoll/pull/5/changes)

It now also uses the correct lengths of bones that are in the blender mesh. In future ill try to get it to parse them out automatically

---

<div class="post-metadata">

**Author:** ![PavelBoytchev](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pavelboytchev/32/38639_2.png) [@PavelBoytchev](https://discourse.threejs.org/u/PavelBoytchev)\
**Post date:** [May 3, 2026, 12:17pm UTC](https://discourse.threejs.org/t/blender-mesh-rapierjs-colliders-results-in-weird-mesh-issues/86683/5 "2026-05-03T12:17:18Z")

</div>

It would be helpful for others if you explain the actual fix – what was wrong and how Claude resolved it.

---

<div class="post-metadata">

**Author:** ![mattvb91](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mattvb91/32/59710_2.png) [@mattvb91](https://discourse.threejs.org/u/mattvb91)\
**Post date:** [May 3, 2026, 1:36pm UTC](https://discourse.threejs.org/t/blender-mesh-rapierjs-colliders-results-in-weird-mesh-issues/86683/6 "2026-05-03T13:36:24Z")

</div>

Whoops the video upload failed the first time around and on refresh half of it went missing yea of course:

Key changes:

1. **Stop overwriting child bone positions.** Only the root (`torso`/`spine`) takes its position from physics; every other bone keeps its rest‑pose offset, which is what the skinning expects. This is the main deformation fix.
2. **Top‑down hierarchical iteration** (`torso` → `head`/limbs → extremities) so parents are updated before children.
3. **`parent.updateMatrixWorld(true)` before reading parent world transform**, and **`bone.updateMatrixWorld(true)` after writing the bone**, so each child sees the freshly‑updated parent.
4. **Stop mutating `bodyQuat` in place** with `.multiply(initialQuat)` — use `bodyQuat.clone().multiply(initialQuat)` so a future caller relying on `bodyQuat` won’t get a corrupted value.
5. Dropped the dead `else` branch’s broken math (`bodyQuat.multiply(parentQuat)` mixed world×world); it’s now `parentInv * bodyQuat` for symmetry with the `initialQuat` path.

As someone pointed out on the issue this might cause new issues now with IK vs FK rigs but ill cross that bridge when we get there.

Ive updated the demo here: [Threejs ragdoll](https://mavon.ie/demos/rapierjs-ragdoll)

---

<div class="post-metadata">

**Author:** ![mattvb91](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mattvb91/32/59710_2.png) [@mattvb91](https://discourse.threejs.org/u/mattvb91)\
**Post date:** [May 20, 2026, 8:33am UTC](https://discourse.threejs.org/t/blender-mesh-rapierjs-colliders-results-in-weird-mesh-issues/86683/7 "2026-05-20T08:33:50Z")

</div>

Reddit user [Interesting-Heron549](https://www.reddit.com/user/Interesting-Heron549/) put together a great VR demo for this… awesome to see:

  

> **[VRragdoll — Rapier NPC + VRrunner body IK](https://vivido-design.com/webxr/VRragdoll/)**
