# How to use density in the HAVOK engine

**URL:** <https://forum.babylonjs.com/t/how-to-use-density-in-the-havok-engine/41681>\
**Category:** Questions\
**Created:** [June 17, 2023, 4:47pm UTC](https://forum.babylonjs.com/t/how-to-use-density-in-the-havok-engine/41681 "2023-06-17T16:47:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WillemCramer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/willemcramer/32/11696_2.png) [@WillemCramer](https://forum.babylonjs.com/u/WillemCramer)\
**Post date:** [June 17, 2023, 4:47pm UTC](https://forum.babylonjs.com/t/how-to-use-density-in-the-havok-engine/41681/1 "2023-06-17T16:47:17Z")

</div>

i want to change the precision, hoped density would do it, but no luck  
is it even possible?

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

line 33

---

<div class="post-metadata">

**Author:** ![Raggar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raggar/32/20672_2.png) [@Raggar](https://forum.babylonjs.com/u/Raggar)\
**Post date:** [June 17, 2023, 6:04pm UTC](https://forum.babylonjs.com/t/how-to-use-density-in-the-havok-engine/41681/2 "2023-06-17T18:04:52Z")

</div>

density should be set on the shape

> <https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/core/src/Physics/v2/physicsShape.ts#L171>

zAggregate.shape.density

---

<div class="post-metadata">

**Author:** ![WillemCramer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/willemcramer/32/11696_2.png) [@WillemCramer](https://forum.babylonjs.com/u/WillemCramer)\
**Post date:** [June 17, 2023, 6:47pm UTC](https://forum.babylonjs.com/t/how-to-use-density-in-the-havok-engine/41681/3 "2023-06-17T18:47:23Z")

</div>

erm, okayyy  
but what’s the effect of it?  
can you show it?

to be perfectly clear:  
what i want to achieve is the spheres not to be visible anymore  
the convex-hull having a maximum ‘resolution’

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [June 19, 2023, 12:31pm UTC](https://forum.babylonjs.com/t/how-to-use-density-in-the-havok-engine/41681/4 "2023-06-19T12:31:50Z")

</div>

Density is used to get the mass of an object:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/9/a9af05d063bd2bd7bde39500b9edcd7bb36814a5.jpeg)

---

<div class="post-metadata">

**Author:** ![WillemCramer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/willemcramer/32/11696_2.png) [@WillemCramer](https://forum.babylonjs.com/u/WillemCramer)\
**Post date:** [June 19, 2023, 6:33pm UTC](https://forum.babylonjs.com/t/how-to-use-density-in-the-havok-engine/41681/5 "2023-06-19T18:33:29Z")

</div>

aha  
i was kind of hoping it would change the resolution of the convex-hull
