I have created a polyline in Cesium by converting an array of x y z coordinates to Cartesian3 objects
var redPos = [array of x y z coordinates];
function arrayToCartesianArray(array) {
let newArray = ;
for (let i = 0; i < array.length; i+=3){
let p = new Cesium.Cartesian3(array[i], array[i+1], array[i+2]);
newArray.push(p);
}
return newArray;
}
viewer.entities.add({
id: ‘test’,
polyline: {
positions: arrayToCartesianArray(redPos),
width: 1,
material: Cesium.Color.RED,
arcType: Cesium.ArcType.NONE,
},
});
The issue is that whenever I run the clock the polyline rotates along with the Earth which I don’t want. How can I get the line to stay still? Thanks.