Rotation of Rectangle

I want to draw a rectangle along with the path of my model. How can i rotate my rectangle or have an any idea ?


My rectangle
image
and this is i want to draw.

viewer.entities.add({
parent : rec,
rectangle: {
coordinates: Cesium.Rectangle.fromDegrees(
bl_long,
bl_lat,
tr_long,
tr_lat,
),
material: Cesium.Color.RED.withAlpha(0.5),
},
});

Hi @Pubodin-T,

A Rectangle in CesiumJS defined an area based on longitudinal and latitudinal extents. For your use case, I recommend using PolygonGraphics instead, as shown in this Sandcastle.

Hope this helps!

Thanks a lot for an idea. Finally ,I did it but i have some bugs. :laughing: