# Multiple Actors causing jitter

**URL:** <https://community.cesium.com/t/multiple-actors-causing-jitter/33188>\
**Category:** Cesium for Unreal\
**Created:** [June 20, 2024, 1:12am UTC](https://community.cesium.com/t/multiple-actors-causing-jitter/33188 "2024-06-20T01:12:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgenehma](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/georgenehma/32/14000_2.png) [@georgenehma](https://community.cesium.com/u/georgenehma)\
**Post date:** [June 20, 2024, 1:12am UTC](https://community.cesium.com/t/multiple-actors-causing-jitter/33188/1 "2024-06-20T01:12:06Z")

</div>

I am creating a simulation of multiple aircraft where they are defined using ECEF coordinates and rotations defined by quaternion from body to ECEF frame. I have successfully used Cesium to display the actors in the simulation and they go the right way and orient correctly, however whatever actor is attached to the camera has no jitter, every other actor has a lot of jitter.

I have used a CesiumGlobeAnchor component on all actors and even an Origin Shift component on the main vehicle, but the jitter still persists. The actors fly at an altitude of around 10000m if that helps. Is there any way to get rid of the jitter, as I am on UE5.4 and thought that double precision floats would solve this issue.

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [June 20, 2024, 9:14am UTC](https://community.cesium.com/t/multiple-actors-causing-jitter/33188/2 "2024-06-20T09:14:27Z")

</div>

Can you share a video of the jitter you’re seeing? I agree Unreal’s double-precision coordinates should eliminate classic jitter caused by limited vertex precision. So it’s likely you’re seeing something different.

How are you moving the objects? Since you presumably get position updates less often than once per render frame, are you interpolating the position in between frames?

---

<div class="post-metadata">

**Author:** ![georgenehma](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/georgenehma/32/14000_2.png) [@georgenehma](https://community.cesium.com/u/georgenehma)\
**Post date:** [June 20, 2024, 2:43pm UTC](https://community.cesium.com/t/multiple-actors-causing-jitter/33188/3 "2024-06-20T14:43:17Z")

</div>

Yes here is a short video, you can see that the other vehicles seem to be jittering around as well as the trail not being smooth. I simulate the vehicles in simulink and then save the data as .csv files, then upload as vector curves and then use a timeline to move the position of the vehicles. I have the data sampled at 0.02 seconds so im not sure if that is the problem.  
 ![VideoProject12-ezgif.com-crop](https://global.discourse-cdn.com/cesium/original/3X/7/6/7647936250ecca047ac83e83bc4d1f7705310371.gif)

If you know of a better way to move the vehicles then I would be open to that too.

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [June 24, 2024, 12:47am UTC](https://community.cesium.com/t/multiple-actors-causing-jitter/33188/4 "2024-06-24T00:47:31Z")

</div>

It’s hard to be sure, but in the video it looks like the objects are actually moving relative to each other. Are you sure there’s not error/jitter in the source data? It could be caused either by position error, or by the objects not all updating at the same rate.

---

<div class="post-metadata">

**Author:** ![georgenehma](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/georgenehma/32/14000_2.png) [@georgenehma](https://community.cesium.com/u/georgenehma)\
**Post date:** [June 24, 2024, 12:42pm UTC](https://community.cesium.com/t/multiple-actors-causing-jitter/33188/5 "2024-06-24T12:42:39Z")

</div>

Yes I thought this might be the issue, so I only had ECEF data for one of the vehicles and then for the other 2 vehicles I created their datasets by using the first vehciles’ and then off-setting their position by a fixed value (before the separation) and they still bounced around like that.

---

<div class="post-metadata">

**Author:** ![georgenehma](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/georgenehma/32/14000_2.png) [@georgenehma](https://community.cesium.com/u/georgenehma)\
**Post date:** [June 24, 2024, 1:54pm UTC](https://community.cesium.com/t/multiple-actors-causing-jitter/33188/6 "2024-06-24T13:54:04Z")

</div>

What would you suggest be the best way to send position data to the objects to have them move as we need? Right now this is how I have it, with the data in the timelines being vector curves. The data is sampled from simulink at 0.02sec.

 ![image](https://global.discourse-cdn.com/cesium/original/3X/1/9/196d9b1866afa03680fbac3852c92c8dca08c36e.png)

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [June 24, 2024, 10:48pm UTC](https://community.cesium.com/t/multiple-actors-causing-jitter/33188/7 "2024-06-24T22:48:22Z")

</div>

Your Blueprint looks fine from what I can see. I might try ticking that “Teleport Physics” box, though it may not matter.

So is it that Timeline component that is offsetting the other vehicles from the first one? Can you share that code? It’ll be important to do that offsetting in double precision, but I’m guessing you already know that. I think Unreal’s `FVectorCurve` class might be only single-precision unfortunately. It returns an `FVector`, which is double-precision, but it evaluates the vector using three single-precision curves for some reason.

---

<div class="post-metadata">

**Author:** ![georgenehma](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/georgenehma/32/14000_2.png) [@georgenehma](https://community.cesium.com/u/georgenehma)\
**Post date:** [June 25, 2024, 11:38am UTC](https://community.cesium.com/t/multiple-actors-causing-jitter/33188/8 "2024-06-25T11:38:29Z")

</div>

ticking the box did not work. I am offsetting the position in Matlab and then exporting as .csv so I don’t believe I am losing the double precision. This is how I am shifting the position vector at each timestep. Maybe something I am doing here is not correct?

 ![image](https://global.discourse-cdn.com/cesium/original/3X/3/0/3032a4712ad0999bcec879c35bdba50e9afbc0f3.png)  
As a test I gave the booster the same position vector as the vehicle in the timeline and it did not jitter.

Each actor has its own timeline in the actor blueprint, maybe I should be doing this in the level blueprint?

---

<div class="post-metadata">

**Author:** ![georgenehma](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/georgenehma/32/14000_2.png) [@georgenehma](https://community.cesium.com/u/georgenehma)\
**Post date:** [June 25, 2024, 7:27pm UTC](https://community.cesium.com/t/multiple-actors-causing-jitter/33188/9 "2024-06-25T19:27:54Z")

</div>

I was looking further into it and noticed when I printed the vector coming out of the timeline to the screen and output, it would only have 3 decimal places of precision. This might explain the issue, if so how would I guarantee the data passed in to the caesium block is double precision?

---

<div class="post-metadata">

**Author:** ![Kevin\_Ring](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/kevin_ring/32/2003_2.png) [@Kevin\_Ring](https://community.cesium.com/u/Kevin_Ring)\
**Post date:** [June 27, 2024, 12:19pm UTC](https://community.cesium.com/t/multiple-actors-causing-jitter/33188/10 "2024-06-27T12:19:32Z")

</div>

From what I can tell from looking at the UE source code, the Timeline component you’re using is single-precision. I think if you need double precision, you simply can’t use it. I understand replacing it will not be simple.

---

<div class="post-metadata">

**Author:** ![georgenehma](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/georgenehma/32/14000_2.png) [@georgenehma](https://community.cesium.com/u/georgenehma)\
**Post date:** [June 27, 2024, 1:31pm UTC](https://community.cesium.com/t/multiple-actors-causing-jitter/33188/11 "2024-06-27T13:31:27Z")

</div>

Thank you very much for your help. This is very helpful, I will find another way.
