Get BatchID with MouseMove

I have created b3dm files with py3dtiles library and included an id for each feature at the same time. Now, I'm trying to access an id of a feature when the mouse is over that feature. However, in the console, I see that the number of features in the batchTable is 0. I'm not sure, maybe there is a better way to access the properties of features in 3Dtiles.

var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
  handler.setInputAction(function(movement) {}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
  
handler.setInputAction(function(movement) {
  var feature = viewer.scene.pick(movement.endPosition);
  console.log(feature);
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);

Let me know if there is a way to get the properties of features or the b3dm file is not created correctly.

1.b3dm (828 KB)

tileset.json (1.82 KB)

You might want to print out the properties in the tilesets:

https://cesiumjs.org/Cesium/Build/Documentation/Cesium3DTileset.html?classFilter=Cesium3d#properties

Given a tile: https://cesiumjs.org/Cesium/Build/Documentation/Cesium3DTile.html

You can get tile.content and then featuresLength:

https://cesiumjs.org/Cesium/Build/Documentation/Cesium3DTileContent.html#featuresLength

If that’s 0, then the tileset wasn’t created with the features you need. This example might be helpful too:

You could also try tiling the data with cesium.com/ion just to check if the issue is in your data or in the tiling.

Hi Omar,

I figured out the py3dtiles hasn’t implemented this part yet, thus, data don’t have properties.

The links that you provided were very useful to me.

Thanks