Hi Omar,
Below is the code used to create sensor,
var rectangularSensor = {};
rectangularSensor.radius = r;
rectangularSensor.xHalfAngle = Cesium.Math.toRadians(25.0); //vertical:2x
rectangularSensor.yHalfAngle = Cesium.Math.toRadians(30.0);
rectangularSensor.portionToDisplay = portion;
rectangularSensor.lateralSurfaceMaterial = new Cesium.GridMaterialProperty();
rectangularSensor.lateralSurfaceMaterial.color = new Cesium.Color(0.0, 1.0, 0.0, 0.8);
rectangularSensor.lateralSurfaceMaterial.cellAlpha = 1.0;
rectangularSensor.lateralSurfaceMaterial.lineCount = {
x: 10,
y: 5
};
rectangularSensor.showLateralSurfaces = showLateralSurfaces;
rectangularSensor.ellipsoidHorizonSurfaceMaterial = new Cesium.GridMaterialProperty();
rectangularSensor.ellipsoidHorizonSurfaceMaterial.color = new Cesium.Color(0.6, 0.6, 0.6, 0.5);
rectangularSensor.ellipsoidHorizonSurfaceMaterial.cellAlpha = 0.5;
rectangularSensor.ellipsoidHorizonSurfaceMaterial.lineCount = {
x: 12,
y: 10
};
rectangularSensor.showEllipsoidHorizonSurfaces = showEllipsoidHorizonSurfaces;
rectangularSensor.domeSurfaceMaterial = new Cesium.GridMaterialProperty();
rectangularSensor.domeSurfaceMaterial.color = new Cesium.Color(1.0, 1.0, 0.0, 0.3);
rectangularSensor.domeSurfaceMaterial.cellAlpha = 0.5;
rectangularSensor.domeSurfaceMaterial.lineCount = {
x: 5,
y: 7
};
rectangularSensor.showDomeSurfaces = showDomeSurfaces;
rectangularSensor.ellipsoidSurfaceMaterial = new Cesium.Color(1.0, 0.0, 1.0, 0.5);
rectangularSensor.showEllipsoidSurfaces = showEllipsoidSurfaces;
rectangularSensor.environmentConstraint = true;
rectangularSensor.showEnvironmentOcclusion = true;
rectangularSensor.environmentOcclusionMaterial = new Cesium.GridMaterialProperty();
rectangularSensor.environmentOcclusionMaterial.color = new Cesium.Color(1.0, 0.0, 0.0, 1.0);
rectangularSensor.environmentOcclusionMaterial.cellAlpha = 0.5;
rectangularSensor.environmentOcclusionMaterial.lineCount = {
x: 0,
y: 0
};
rectangularSensor.showEnvironmentIntersection = false;
rectangularSensor.environmentIntersectionWidth = 10.0;
rectangularSensor.environmentIntersectionColor = new Cesium.Color(1.0, 0.0, 1.0, 0.3);
thanks.