trackedEntity camera motion in case of GpxDataSource

I already spend a lot of time to find a working solution, how to follow the moving marker of a recorded GPX track resp. GpxDataSource by the camera, but I didn’t succeed.

It’s such a simple desire, but nothing works.

Perhaps I have to add another helper entity synchronized to the position property of the data source to be finally able to utilize the viewer’s trackedEntity method, or something similar…

I would be really happy, if anybody here could give me a hint, how to realize this kind GPX driven object and camera motion in the most simple manner like in the flight path interpolation sandbox examples.

Hi @mash-graz

I created a Sandcastle demonstrating how this can be currently achieved. It’s not ideal, but I think it achieves the result you’re looking for. Let me know if this solves your problem.

Thanks, @Gfycat.com for your very useful suggestions.

Yes – your sandbox example is indeed much closer to the desired result as any of my previous attempts (…which in fact didn’t work at all, because I couldn’t figure how to access the changing position information).

Nevertheless, I’m still not perfectly satisfied by your proposal, because this kind of changing the camera position in the tick-callback doesn’t support those relative free view angle modifications via GUI user interaction, which are provided in case of tracking by the trackedEntity feature.

But thanks to your suggestions, I could finally figure out another workaround by utilizing a constantly repositioned helper object, which seems to support the trackedEntity mechanism.

Here is a simple demonstration:

Cesium Sandcastle.

Thanks again for your encouraging help! :slight_smile:

I’m glad you were able to resolve the issue! Thank you for sharing your solution!