Cesium 1.65 polyline keeps following earth's curvature and won't revert to straight

1. A concise explanation of the problem you’re experiencing.

Noob Question : Please forgive my mistakes

I am attempting to add a straight polyline as an entity . The polyline is dynamic, meaning it takes coordinates from two other dynamic entities. I need to see the line as a straight one (even cutting through the earth) . I think I am doing something wrong here , as never mind what , the line keeps following earth’s curvature. it is beutiful , but not what I need

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

            function getPositions()


                //Getting the _value is a bug discovered which is not documented

                //the .position property is said to be of Cartesian3 in the docs

                //However , it is not. The _value is the cartesian val

                //entArray [] is an array of : viewer.entities.add(....

                var pos1 = entArray[0].position._value;

                var pos2 = entArray[5].position._value;

                return [pos1,pos2];


            entArray[entArray.length] = viewer.entities.add({


                    followSurface: false, //Doesn't work

                    width: 2, //Works great

                    positions: new Cesium.CallbackProperty(getPositions,false), //works great

                    material: new Cesium.ColorMaterialProperty(Cesium.Color.RED) //works great



3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I need to draw a straight line of sight between two moving objects

4. The Cesium version you’re using, your operating system and browser.

using version 1.65 , Windows 10 64 bits with Chrome64 Version 77.0.3865.90 (Official Build) (64-bit)

followSurface was removed in 1.55:


Instead you can pass in an ArcType. See:

Also welcome to the Cesium forum! What kind of project are you working on?

Thank you very much , Omar, It seems I also misled with the version , it is 1.62 ( sorry , slight dislection here ) indeed the ArcType=None is working great.

I am working on a drone project with behavior trees.

Also noticesd something else: I created a polyline with Show: False , so that it would be ready for the time I ask to show it. When the time came , and I asked to show it , This never worked. However, When I created the line with show: True , and immadiately afterwards I asked to show: False, the logic kept on working great ( even for future show: true/False) any insights on that ?

Thanks again !

I think CesiumJS will optimize the show false, and not creating the geometry until it’s set to true. So I would expect it to show up eventually.

A different way to do this would be instead of show true/false, to give it a color, and change the color from alpha 0 to alpha 1 when you want to toggle it.