I am experiencing a great deal of jittering when creating a polyline ( in this case it would technically be a line) between two points when I move or rotate. The polyline is created with PolylineGraphics
The jittering disappears when I set clampToGround:true but clamping it to the ground in my use case does not make sense. Does anyone know why this happens and how I can eliminate the jittering?
If the polyline disappearing behind other geometry is the chief concern, one option would be to set the depthFailMaterial to a material which matches or is similar to the regular material.
You could also use sampleHeight to ensure the endpoint selection are on “top” of the tileset geometry.
Thank you for your reply, the Sand Castle example that you linked, has large amounts of flickering as well and this is what I am trying to figure out how to avoid. Is there something in how Cesium deals with update frames that makes polylines jitter? Would it be that in every render call that is made when the camera moves, and the way how polylines are rendered makes the flickering happen?
Also, another very pressing concern is that the line drawn does not even match both endpoints.
Am I missing something? surely drawing a line between two points is a simple operation, so I am guessing it has to do with how polylines are rendered in Cesium
Something I did not clarify in the previous post is that I created both endpoints by clicking on the screen, so not sure if this is having some weird influence and if the points are what is actually moving.
Jittering gets worse on smaller polylines. I also tried this Sand Castle Example, and the jittering is not displayed on the cyan polyline. The only way you can perceive it is if you start zooming in very close. So it seems like the jitter amount is a function of distance to the object? The same behaviour can be perceived in the first Sand Castle that you sent me as well.
If this is true, it would be quite problematic for me, because as you can see, because the units I am dealing with are centimetres and meters, and perhaps short km distances.
I think it’s fair to assume that your issue might be quite local. I don’t see any jittering, and I support a large product doing very similar things to what you’re showing, and I don’t hear anything from our customers about this. Would you be able to capture a quick video to show the jitter?
It has no effect, in fact, I was already using PolylineOutlineMaterialProperty when creating the polyline, the only difference was that I was only setting its color property
Anyways, I tested the sand castle examples I posted in the previous reply on Windows, not on the macOS + M1 chip and the jittering is not there. I will continue the discussion in GitHub