viewer.scene.globe.pick do not pick Cesium3DTileset's tile

var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction((movement) => {
  // var pickedPrimitive = viewer.scene.pick(movement.position);
  var ray = viewer.scene.camera.getPickRay(movement.position);
  var cartesian = viewer.scene.globe.pick(ray, viewer.scene);

  if (cartesian) {
      viewer.entities.add({
          id: nombre.toFixed(2),
          position: cartesian,
          point : {
            pixelSize : 10,
            color : Cesium.Color.YELLOW
          }
      });
  } else {
      alert('Globe was not picked');
  }
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);

I want to use the code to get the intersection of a ray and a Cesium3DTileset. But get the intersection of the ray and the background tarrein. How can i get what i want?

Hi,
you can use PickPosition to pick the 3d position.

https://cesiumjs.org/Cesium/Build/Documentation/Scene.html#pickPosition

I need to use a ray to test intersetion, because pickPosition only support windowPosition.And sometimes the ray do not set from window.

We’re working on a feature to do this now, see #6080. In the meantime, here’s an example with a workaround.

Thanks,

Gabby