How do I get the point position through drill pick

Is it possible to get position of points that I get though drill pick in pointcloud?

Position of what points? If you’ve got various point Entities and you drillPick() them, then in the Entities returned you get the position. Maybe expand a bit on what you’re trying to do?

Cheers,

Alex

When drill pick is done, I get the list of objects ( usually I get one object in the array) of structure
{
content: PointCloud3DTileContent,
primitive: Cesium3DTileset
}

The following image shows the expanded version of the object. I see under _pickObjects, there are list of objects which are picked, but I am unable to get position the the entities listed.

Again, this comes down to what you’re trying to do. Do you mean the picked position of your mouse at it hits those objects, or the “position” of those objects? What do you intend to do with the picked position?

Cheers,

Alex

I want to get positions of those picked objects.

No, I got that, but I’m asking you what you mean by that? Because, from your example and code, you’re dealing with pointclouds, and what do you mean the object’s picked position? A pointcloud spans an area, it has no one point which is its picked position. Do you then mean, the point you clicked, or the pointclouds bounding middle point (representing the object)?

It’s very simple, in some ways. Do your drillPick() to get the objects in your path, and use pickPosition() to get the position of whatever you hit (objects, map, globe, etc.). Does that clarify it a bit better?

I should here point out that picking on pointclouds is especially challenging, as drillPick() might hit a pointcloud object, but pickPosition() might fall between the cracks and hit something else, so for these scenarios, depending on the seriousness and accuracy of your picking needs, you might need to drillPick() / pickPosition() a few times around the same mouse coordinate and compare height of picked position to make sure you hit it right. We can get into more details around that later if needed.

Cheers,

Alex

1 Like

Thank you @Alexander_Johannesen for the detailed reply.
In my simple understanding, since I was dealing with sparse pointcloud and drillPick accepts the rectangular input (rather than a point), I could collect the points selected and get a average of it. Though I was getting a list of selections as TileSets , I could not access the original/transformed point coordinate. It seems my understanding is wrong. I will try to follow multiple drillPick() / pickPosition() .