Hi, I have a GroundPrimitive. Is it possible to move it to a new position? I want it to follow a moving object on the ground. I have a lot of these objects, so the Entity method won’t work; it’s causing a significant frame rate drop. I tried making the geometry instance depend on the global position of the ModelMatrix using a regular Primitive, but it didn’t work.
Hi @Denis812,
Thanks for your post and welcome to the Cesium community.
One option you may consider is the CallbackPositionProperty. This is a position property whose value is lazily evaluated by a callback function. Our docs recommend to use a CallbackPositionProperty when your data can’t be pre-computed, like to follow other objects following a path that is not pre-determined. Sandcastle | CesiumJS
If you know the path of the objects you are trying to follow, you could use a class for that scenario called SampledPositionProperty where you supply the positions up front. Sandcastle | CesiumJS
Please let us know if these suggestions are helpful for what your are trying to achieve or if you have more questions.
Thanks,
Luke
Спасибо за ваш ответ ! у ГроундПримитиве нет свойства поситион, а мне бы их использовать, т.к. в моем приложении можно динамически переключать рельеф, и ГроундПримитиве тут бы отлично подошел бы, ведь он всегда прилипает в поверхности.Я не совсем представляю как сделать Энтити или Примитиве, которому я бы регулировал высоту круга, чтобы она всегда прилипала к поверхности, именно поэтому я хотел использовать ГроундПримитиве