# ArcRotateCamera loses animated target

**URL:** <https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183>\
**Category:** Bugs\
**Tags:** animation, camera, arcrotatecamera\
**Created:** [October 28, 2025, 9:18pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183 "2025-10-28T21:18:31Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![qwiglydee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/qwiglydee/32/47365_2.png) [@qwiglydee](https://forum.babylonjs.com/u/qwiglydee)\
**Post date:** [October 28, 2025, 9:18pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183/1 "2025-10-28T21:18:31Z")

</div>

I am trying to make camera to track animated (rigged) object from constant position  
(i.e. the same way as live human would track moving stuff)

The targeting kinda works, but the object disappears out of view at some edge positions (and it’s not near/far but sideways).

> **[Babylon.js Playground](https://playground.babylonjs.com/?inspectorv2=true#H0IYZJ%238)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

The code of targeting is simplified to bare minimum.  
Using the built-in `setTarget` does not help.

When animation is topped from inspector, rotating camera around reveals target under some angle, but under some other angle it lost again.

---

<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:** [October 28, 2025, 9:58pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183/2 "2025-10-28T21:58:59Z")

</div>

cc @georgie

---

<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 28, 2025, 10:37pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183/3 "2025-10-28T22:37:22Z")

</div>

If tweak `camera.fov` a bit the whole animation seems to work correctly, without disappearing - [https://playground.babylonjs.com/?inspectorv2=true#H0IYZJ#9](https://playground.babylonjs.com/?inspectorv2=true#H0IYZJ#9)

Another way is to increase camera radius a bit - [https://playground.babylonjs.com/?inspectorv2=true#H0IYZJ#13](https://playground.babylonjs.com/?inspectorv2=true#H0IYZJ#13)

---

<div class="post-metadata">

**Author:** ![qwiglydee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/qwiglydee/32/47365_2.png) [@qwiglydee](https://forum.babylonjs.com/u/qwiglydee)\
**Post date:** [October 29, 2025, 3:41am UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183/4 "2025-10-29T03:41:04Z")

</div>

Ok, here is update with debugging cockpit.

> **[Babylon.js Playground](https://playground.babylonjs.com/?inspectorv2=true#H0IYZJ%2314)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

The issue is that while the target node changes it’s location following rig animation, original mesh retains its “rest position”.  
Camera checks visibility of the object by its rest position, unaffected by animation.

Also, Babylon creates 2 items with the same name for original gltf mesh-node: a mesh and a transformnode.  
Neither of them are affected by animations.  
Camera only checks the ‘Mesh’ item.

Another playground with all 3 items:

> **[Babylon.js Playground](https://playground.babylonjs.com/?inspectorv2=true#H0IYZJ%2316)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

---

<div class="post-metadata">

**Author:** ![georgie](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/georgie/32/46049_2.png) [@georgie](https://forum.babylonjs.com/u/georgie)\
**Post date:** [October 29, 2025, 3:51am UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183/5 "2025-10-29T03:51:59Z")

</div>

Thank you! I’ll take a look, apologies for any delay as I work through various investigations

---

<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 29, 2025, 4:03am UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183/6 "2025-10-29T04:03:16Z")

</div>

There was the related discussion - [Ray picking in SkinnedMesh](https://forum.babylonjs.com/t/ray-picking-in-skinnedmesh/58029)

I believe it is enough just to add to your retarget function  
`(mesh as BABYLON.Mesh).refreshBoundingInfo(true)`

Example - [https://playground.babylonjs.com/?inspectorv2=true#H0IYZJ#18](https://playground.babylonjs.com/?inspectorv2=true#H0IYZJ#18)

---

<div class="post-metadata">

**Author:** ![qwiglydee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/qwiglydee/32/47365_2.png) [@qwiglydee](https://forum.babylonjs.com/u/qwiglydee)\
**Post date:** [October 29, 2025, 4:13am UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183/7 "2025-10-29T04:13:46Z")

</div>

The documentation states:

> To satisfy this requirement from glTF, the glTF loader loads the skinned mesh without its own transform and parents the skinned mesh as a sibling of the skeleton root node. For the CesiumMan model, this is at the same location, but for other cases, it might not be in the same location in the scene hierarchy. Furthermore, the skinned mesh is allowed to have child nodes that have meshes or additional hierarchies. Thus, in additional to creating a skinned mesh, the glTF loader also creates a node that represents the glTF node with the skinned mesh, in case this node is animated or has additional child nodes.

So, it seems like the asset is loaded quite correctly, and the mesh `aerobatic_plane.2` is parented to the root bone `root.4`.

Maybe, the issue is that in this particular asset, motion of the whole object affects not root bone, but its ancestor `body_joint.5`, while root bone/node stays still. This is somewhat strange rigging, but im not an expert.

@bghgary it seems like you’ve been working on the skinning/parenting stuff back in 2018, and you’re indeed an expert. Could you please clarify, if there’s an issue with the asset, or with camera, or there’s some better way to make such tracking work?

---

<div class="post-metadata">

**Author:** ![qwiglydee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/qwiglydee/32/47365_2.png) [@qwiglydee](https://forum.babylonjs.com/u/qwiglydee)\
**Post date:** [October 29, 2025, 4:26am UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183/8 "2025-10-29T04:26:01Z")

</div>

Nice! Thanks!

Yet it still looks somewhat weird it’s not updated automatically.

I assume it would also affect many other aspect such as collisions or highlightin or something.

---

<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 29, 2025, 4:35am UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183/9 "2025-10-29T04:35:19Z")

</div>

Highlight seems to be OK - [https://playground.babylonjs.com/?inspectorv2=true#H0IYZJ#19](https://playground.babylonjs.com/?inspectorv2=true#H0IYZJ#19)

For collisions `refreshBoundingInfo(true)` also should work.

---

<div class="post-metadata">

**Author:** ![kzhsw](https://avatars.discourse-cdn.com/v4/letter/k/848f3c/32.png) [@kzhsw](https://forum.babylonjs.com/u/kzhsw)\
**Post date:** [October 29, 2025, 8:32am UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183/10 "2025-10-29T08:32:35Z")

</div>

`alwaysSelectAsActiveMesh` is simpler and faster since `refreshBoundingInfo` is a cpu-heavy operation if the requirement is to view it.

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

---

<div class="post-metadata">

**Author:** ![qwiglydee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/qwiglydee/32/47365_2.png) [@qwiglydee](https://forum.babylonjs.com/u/qwiglydee)\
**Post date:** [October 29, 2025, 1:00pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183/11 "2025-10-29T13:00:47Z")

</div>

Good idea! Thanks!

In my usecase of product visualization (~1 object) it even makes sense to turn it on peranently.

---

<div class="post-metadata">

**Author:** ![qwiglydee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/qwiglydee/32/47365_2.png) [@qwiglydee](https://forum.babylonjs.com/u/qwiglydee)\
**Post date:** [November 6, 2025, 9:46pm UTC](https://forum.babylonjs.com/t/arcrotatecamera-loses-animated-target/61183/12 "2025-11-06T21:46:36Z")

</div>

However, that trick breaks picking objects affected by animations (even when animations are topped/paused).

Probably, the `refreshBoundingInfo` should still be called when animations stop.
