Focus the camera on the "average point" of moving entities

Hi,
What I have understood is you have group of moving entities and each group has a median point and you want to focus camera on those median points.

You can check this post to calculate midpoint between 2 cartesian3 values.

You can use addEventListener to perform actions on each tick:

viewer.clock.onTick.addEventListener(function (clock) {
// your stuff here...
});

I suggest you to create a sandcastle example for our better understanding.

  • Regards