ModelMatrix in GroundPrimitive

Hi, I need to import the image and drape on the terrain and add functionality to transform the image. So for this purpose, I used GroundPrimitive with RectangleGeometry. and used image as the texture. I tried using “rotation” and “stRotation” property under RectangleGeometry, but the image and rectangle also gets skewed. And then I tried using “modelMatrix” property under GeometryInstance, It does not work. After rendering, the Identity Matrix gets set as modelMatrix. I have added a sample in sandcastle for both cases.
With modelMatrix
With rotation property

Hi @prasun1223 ,
Thanks for your post and welcome to the Cesium community.

One possible solution for the use case you are describing is to create an Entity with a polygon, where you set the polygon material to the image. You can then use textureCoordinates to orient the material (ie. transform the image) on the polygon.

This sandcastle example shows the basic API for this approach Cesium Sandcastle

If this is not a fit for you use case, please let us know and we can drill down further.

Thanks,
Luke