# How and when to use mesh.freezeWorldMatrix()?

**URL:** <https://forum.babylonjs.com/t/how-and-when-to-use-mesh-freezeworldmatrix/13906>\
**Category:** Questions\
**Created:** [September 4, 2020, 8:35am UTC](https://forum.babylonjs.com/t/how-and-when-to-use-mesh-freezeworldmatrix/13906 "2020-09-04T08:35:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [September 4, 2020, 8:56am UTC](https://forum.babylonjs.com/t/how-and-when-to-use-mesh-freezeworldmatrix/13906/2 "2020-09-04T08:56:08Z")

</div>

Make sure you update the position/rotation/scaling of your meshes by updating the properties of the position / rotation / scaling and not by replacing them.

That is:

```auto
mesh.position.x = 34;

```

and not:

```auto
mesh.position = new BABYLON.Vector3(34, 0, 0);

```

When you replace one of these properties by a new object, the matrix is recomputed even if frozen.

If you don’t update the position/rotation each frame, calling `freeze` should be a gain so you should do it.

---

_[View the full topic](https://forum.babylonjs.com/t/how-and-when-to-use-mesh-freezeworldmatrix/13906)._
