# How to add physical collision to imported model characters

**URL:** <https://forum.babylonjs.com/t/how-to-add-physical-collision-to-imported-model-characters/46238>\
**Category:** Questions\
**Created:** [December 7, 2023, 6:17am UTC](https://forum.babylonjs.com/t/how-to-add-physical-collision-to-imported-model-characters/46238 "2023-12-07T06:17:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![xuan\_mo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/xuan_mo/32/36022_2.png) [@xuan\_mo](https://forum.babylonjs.com/u/xuan_mo)\
**Post date:** [December 7, 2023, 6:17am UTC](https://forum.babylonjs.com/t/how-to-add-physical-collision-to-imported-model-characters/46238/1 "2023-12-07T06:17:21Z")

</div>

I have enabled the havok physics engine.  
I imported a scene model and then imported a character. How do I add physical collision to this character.

```auto
const root: AbstractMesh = meshes[0]

root.getChildMeshes().map(mesh => {
    new PhysicsAggregate(mesh, PhysicsShapeType.MESH, {mass: 100})
})

```

I add it like this and the character will fly into the sky

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [December 7, 2023, 8:33am UTC](https://forum.babylonjs.com/t/how-to-add-physical-collision-to-imported-model-characters/46238/2 "2023-12-07T08:33:01Z")

</div>

Making a ragdoll needs a little bit more work.  
There must be a shape per bone that bounds the entirety of the mesh and then, between dynamic bodies, there must be joints.

Check this PG:

> **[Babylon.js Playground](https://playground.babylonjs.com/#JHU3EV%2310)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [December 7, 2023, 10:15am UTC](https://forum.babylonjs.com/t/how-to-add-physical-collision-to-imported-model-characters/46238/3 "2023-12-07T10:15:09Z")

</div>

Recently I found very good Havok Character Controller, demo here - [Ergoudan](https://armomu.github.io/ergoudan/#/)  
Source code is here - [GitHub - armomu/ergoudan: Havok physics character controller demo using Babylon.js 6](https://github.com/armomu/ergoudan)

---

<div class="post-metadata">

**Author:** ![xuan\_mo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/xuan_mo/32/36022_2.png) [@xuan\_mo](https://forum.babylonjs.com/u/xuan_mo)\
**Post date:** [December 11, 2023, 9:18am UTC](https://forum.babylonjs.com/t/how-to-add-physical-collision-to-imported-model-characters/46238/4 "2023-12-11T09:18:58Z")

</div>

I see that PhysicsImpostor is still used in the code. Are the current documents written in PhysicsAggregate-related writing methods?

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [January 8, 2024, 8:56am UTC](https://forum.babylonjs.com/t/how-to-add-physical-collision-to-imported-model-characters/46238/5 "2024-01-08T08:56:54Z")

</div>

Physics impostor is still in the code because some users still use V1 physics for now and need updated Babylon.js
