How to get the ModelMatrix of a Cesium Entity in run-time


I’m trying to change the scale of an entity on only one axis (z-axis in this particular case) but I can’t seem to find a way to get the transform matrix of added entities from 3D models so that it could be changed post the entity definition.

I know the ModelGraphics object inside the Model has the Scale atribute, but that changes the scale of the model in all axis (not what i’m looking for)

Any hints on how can I do this ?

Hi there,

So, when you say “entity”, you mean a Cesium Entity? They don’t have transforms, so I’m not sure that’s what you’re after? Entities operate on coordinates, and there’s plenty of libraries out there that can take an array of coordinates and transform them in different ways (Cesium has a few helper classes as well that do similar things) so you can definitly do what you want, but maybe not the way you thought?

Anyway, I don’t want to speculate, so please let us know what you’re doing, and what you’re trying to achive, maybe there’s a different way?



Hi @Alexander_Johannesen! Thanks for the response!

Yes, I meant a Cesium Entity!

When I was talking about “transforms”, it was in a similar sense to Cesium GeometryInstances having a ModelMatrix, where it can be aplied a scale in a particular axis using something like Cesium.Matrix4.setScale

So, to get back to my question, can this sort of thing (get the ModelMatrix) be done to Cesium Entities generated from 3D models (from a .glb file in my particular case)?

I’ll also change the title of this topic so it’s clearer what I’m asking

Best regards,



Not that I know out of the box. I’m assuming then that you’re dealing with an EntityCollection? And that you’re not interested in controlling individual entities, but the collection as a whole in terms of scale / transform? I don’t know how to do that except a) extract all the positions, b) do a transform (lots of libs for this), and c) put those positions back (I’d look at Cesium’s callbackProperty, as well as looking into if CZML can help you out).