# Skeleton lag when mesh child of camera

**URL:** <https://forum.babylonjs.com/t/skeleton-lag-when-mesh-child-of-camera/3862>\
**Category:** Bugs\
**Created:** [June 13, 2019, 9:45am UTC](https://forum.babylonjs.com/t/skeleton-lag-when-mesh-child-of-camera/3862 "2019-06-13T09:45:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@adam](https://forum.babylonjs.com/u/adam)\
**Post date:** [June 13, 2019, 9:45am UTC](https://forum.babylonjs.com/t/skeleton-lag-when-mesh-child-of-camera/3862/1 "2019-06-13T09:45:45Z")

</div>

Here is a test PG I created that has a rabbit with a sphere that is set according to a bone position.

[https://playground.babylonjs.com/#QY1WYT#97](https://playground.babylonjs.com/#QY1WYT#97)

If you rotate the camera, you can see that the sphere lags behind. You should also be able to see that the skeleton viewer lags (you might have to zoom out to see it).

I can’t use attach to bone for what I’m doing in my project. I need to be able to set a position relative to bone position of a character that is a child of the camera.

BTW, I wasn’t able to update the PG title when saving (chrome).

---

<div class="post-metadata">

**Author:** ![adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@adam](https://forum.babylonjs.com/u/adam)\
**Post date:** [June 13, 2019, 11:38am UTC](https://forum.babylonjs.com/t/skeleton-lag-when-mesh-child-of-camera/3862/2 "2019-06-13T11:38:05Z")

</div>

Well, computing the meshes world matrix fixes this example.

[https://playground.babylonjs.com/#QY1WYT#98](https://playground.babylonjs.com/#QY1WYT#98)

That doesn’t work in my project, though. I think I need to come up with a better example that uses the IKController.

The skeleton viewer still lags. That still might be related to my issue.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [June 13, 2019, 3:39pm UTC](https://forum.babylonjs.com/t/skeleton-lag-when-mesh-child-of-camera/3862/3 "2019-06-13T15:39:28Z")

</div>

Seems like there is a frame or two of lag…Like the viewer was not sync at the right time

---

<div class="post-metadata">

**Author:** ![adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@adam](https://forum.babylonjs.com/u/adam)\
**Post date:** [June 14, 2019, 2:25am UTC](https://forum.babylonjs.com/t/skeleton-lag-when-mesh-child-of-camera/3862/4 "2019-06-14T02:25:56Z")

</div>

I discovered the issue in my project. It had nothing to do with BJS.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [June 14, 2019, 2:53pm UTC](https://forum.babylonjs.com/t/skeleton-lag-when-mesh-child-of-camera/3862/5 "2019-06-14T14:53:59Z")

</div>

Ok cool (well kind of ":))
