# Mesh Disappearing when camera is moving

**URL:** <https://forum.babylonjs.com/t/mesh-disappearing-when-camera-is-moving/54140>\
**Category:** Questions\
**Tags:** bones\
**Created:** [October 15, 2024, 7:02pm UTC](https://forum.babylonjs.com/t/mesh-disappearing-when-camera-is-moving/54140 "2024-10-15T19:02:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafael-29](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rafael-29/32/29145_2.png) [@rafael-29](https://forum.babylonjs.com/u/rafael-29)\
**Post date:** [October 15, 2024, 7:02pm UTC](https://forum.babylonjs.com/t/mesh-disappearing-when-camera-is-moving/54140/1 "2024-10-15T19:02:31Z")

</div>

Hi I am working with bone manipulation so I am moving the bones of an imported mesh using ImportedMesh.skeletons[0].bones[0].position = another position. it works as expected but I noticed that when my camera is moving or looking into different location the mesh is starting to appear disappear. I am not sure if this is a bug or I am just missing something here. I have a playground that you can take a look. I really appreciate if someone can help me 🙏

> **[Babylon.js Playground](https://playground.babylonjs.com/#94OCGT)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 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:** [October 15, 2024, 7:14pm UTC](https://forum.babylonjs.com/t/mesh-disappearing-when-camera-is-moving/54140/2 "2024-10-15T19:14:53Z")

</div>

One of possible solutions - [https://playground.babylonjs.com/#94OCGT#2](https://playground.babylonjs.com/#94OCGT#2)

```auto
meshes.forEach((m) => {
            m.alwaysSelectAsActiveMesh = true
        })

```

---

<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:** [October 15, 2024, 7:44pm UTC](https://forum.babylonjs.com/t/mesh-disappearing-when-camera-is-moving/54140/3 "2024-10-15T19:44:24Z")

</div>

That’s because the bounding boxes are computed according to the base mesh, not the skeleton / animations (in fact, in case of gltf/glb files, I think the bounding box is retrieved from the file):

> **[Babylon.js Playground](https://playground.babylonjs.com/#94OCGT%233)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

Your meshes disappear when their bounding boxes are outside the camera frustum. The simple fix is the one provided by @labris. If you don’t want to completely remove frustum check, you can manually assign bounding boxes big enough to encompass whatever poses / animations are applied.

---

<div class="post-metadata">

**Author:** ![rafael-29](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/rafael-29/32/29145_2.png) [@rafael-29](https://forum.babylonjs.com/u/rafael-29)\
**Post date:** [October 16, 2024, 4:43am UTC](https://forum.babylonjs.com/t/mesh-disappearing-when-camera-is-moving/54140/4 "2024-10-16T04:43:21Z")

</div>

Thank you so much Iabris. I can’t praise you more than enough ! 🥹 🥹 🥹
