Getpropertyname error, unrecognized object type to 3D Tileset


I don’t know why I get errors that scene.pick(movement.endPosition); doesn’t have getpropertyname function.

Also, console.log(feature instanceof Cesium.Cesium3DTileset); should be true since the pointed feature is Cesium3DTileset but it isn’t giving me false.

I’m reffering,

for the purpose to get the height of terrain when mouse hovering at.

I’m happy to hear any idea of solution.

// Create Cesium World Terrain with default settings

    var viewer = new Cesium.Viewer('cesiumContainer', {

        terrainProvider : Cesium.createWorldTerrain()


    var scene = viewer.scene;


    if (!scene.pickPositionSupported) {

      window.alert("This browser does not support pickPosition.");


    var handler;

    var tileset = viewer.scene.primitives.add(

      new Cesium.Cesium3DTileset({

        // 409019

        url: Cesium.IonResource.fromAssetId(368630),




  // Mouse over the globe to see the cartographic position

  handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);

  // On mouse over, display all the properties for a feature in the console log.

  handler.setInputAction(function(movement) {

    var feature = scene.pick(movement.endPosition);


    console.log(feature instanceof Cesium.Cesium3DTileset);

        var propertyNames = feature.getPropertyNames();

        var length = propertyNames.length;

        for (var i = 0; i < length; ++i) {

            var propertyName = propertyNames[i];

            console.log(propertyName + ': ' + feature.getProperty(propertyName));


  }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);