# Follow Camera + animation groups

**URL:** <https://forum.babylonjs.com/t/follow-camera-animation-groups/11185>\
**Category:** Questions\
**Created:** [May 27, 2020, 2:06pm UTC](https://forum.babylonjs.com/t/follow-camera-animation-groups/11185 "2020-05-27T14:06:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nejurgis](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@nejurgis](https://forum.babylonjs.com/u/nejurgis)\
**Post date:** [May 27, 2020, 2:06pm UTC](https://forum.babylonjs.com/t/follow-camera-animation-groups/11185/1 "2020-05-27T14:06:48Z")

</div>

Hey Guys, i have a scene with a imported glb model that was animated in blender, and i would like to figure out how to make the follow camera follow the model.

I was fiddling around a lot till i realised that the model mesh position stays the same, and in follow camera examples you always see mesh position changing. And in my case, i suppose the animation groups are what changes the model’s position?

Would anyone know if this line of thought is correct and how would one solve it?  
[https://www.babylonjs-playground.com/#SQ5UC1#123](https://www.babylonjs-playground.com/#SQ5UC1#123) (you have to zoom out a bit to see the stage and the model)

thanks in advance!

---

<div class="post-metadata">

**Author:** ![Wingnut](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/wingnut/32/53_2.png) [@Wingnut](https://forum.babylonjs.com/u/Wingnut)\
**Post date:** [July 3, 2020, 4:25am UTC](https://forum.babylonjs.com/t/follow-camera-animation-groups/11185/2 "2020-07-03T04:25:24Z")

</div>

Hi N… sorry for the lack of replies. Were you able to find another solution?

I think I understand the issue. When a model’s _position_ never changes, and it is instead animated via transforming (moving/scaling) the model’s vertex coordinates (often called _positionKind_), the followCamera doesn’t know what/how to follow.

There’s really two possible solutions… neither are “graceful” or necessarily wise.

1. Overload/modify the followCamera to ALLOW a vertex (or a group of vertices who have their positionKind data “averaged”/“summed”)… to be used as a followCam target. This would require some model positionKind data querying/preprocessing… prior to each followCamera update. (yech)

2. Somehow “attach” an invisible basic primitive (like a sphere or box) onto a vertex or group of averaged vertices of the model. In other words, somehow attach a “legal followCam target”… to the animated vertices of the model. (another yech).

Let’s listen for more comments. Yes, I know, I know, you have been listening for comments for a LONG time… sorry about that.

This is an interesting issue/topic. Your use-case MIGHT BE substantiation/justification… to modify/enhance the BJS followCamera… to allow it to follow a vertex (a positionKind value).

Perhaps followCameras SHOULD have dual “target modes”. Follow the target’s _position_, or follow the target’s 5th vertex (for example). hmm… worthy of a good beard-scratching.

I think standard followCamera’s also deal-with target _rotation_, and that characteristic is not available when following a single animated vertex. BUT, rotational data COULD be available… IF the target were a GROUP of vertices… perhaps. That’s not an easy calculation, though.

Calculating if/how a GROUP of vertices has rotated during a frame of vertex animation… “feels” beyond the intelligence of a followCamera, and could easily bog-down the camera’s follow-updating.

Have I analyzed this TO DEATH, yet? 🙂@nejurgis… I think you deserve an in-depth pondering… considering you’ve waited patiently for SO LONG. You sure know how to ask a difficult question. 🙂

Maybe someone has other ideas. Stay tuned and stay well.
