Dear all,
I would like to know if there’s a way to get the current PixelSize of a model?
I have an entity defined as follow:
var entity = viewer.entities.add({
id : controller.id,
name : node.name,
position : position,
model : {
uri : ‘models/node.gltf’,
minimumPixelSize: 128,
maximumScale : 1000
}
});
``
In the viewer, if I understood correctly the documentation, my 3d model is scaled depending on the camera zoom between a maximum scale value of 1000 and a minimum pixel size of 128.
I have to connect another 3d model with a polyline, not mapped on the terrain but with a specific height, defined as follow:
var entity = viewer.entities.add({
id : link.id,
type : “physical”,
polyline : {
positions : Cesium.Cartesian3.fromDegreesArrayHeights(positions),
width : 2,
material : defaultPhysicalColor
}
});
``
Everything is fine, obviously when I zoomin/out the models change their dimensions but the heights of the polyline is always the same.
So, my idea is to update the heights values of the polyline depending on the 3d model dimensions in order to keep the connection point of the 3d model and the line always at the same position.
Is this possible? Thanks, Michele