How to pick dynamic object ?

Hi,

I'm trying to pick dynamicObject with Cesium.
I've create a dynamic datasource and add a dynamic object to it.
Every thing is displaying correctly (even if the position of the object is moving).

But with the debugger, in the handler setInputAction method, the picked object is always undefined.

What is wrong ?

Thank you for your help.

Here is my code :

//Create a viewer
var viewer = new Cesium.Viewer('cesiumContainer');

//Add a mouse click handler
var scene = viewer.scene;handler = new Cesium.ScreenSpaceEventHandler(scene.getCanvas());
handler.setInputAction(
  function(mouseMoveEvent){
    var pickedObject = scene.pick(movement.position);
    alert(pickedObject);
  },
  Cesium.ScreenSpaceEventType.LEFT_CLICK);

//Create a datasouce
var czmlDataSource = new Cesium.CzmlDataSource();
  viewer.dataSources.add(czmlDataSource);

//Create a dynamic object
dynamicObject = new Cesium.DynamicObject();
dynamicObject.position = new Cesium.ConstantPositionProperty(Cesium.Ellipsoid.WGS84.cartographicToCartesian(Cesium.Cartographic.fromDegrees(4+Math.random()*10, 40+Math.random()*10, 5000*Math.random())));
var billboard = new Cesium.DynamicBillboard();
dynamicObject.billboard = billboard;
billboard.image = new Cesium.ConstantProperty('./images/icon.png');
billboard.scale = new Cesium.ConstantProperty(1.0);

//Add the dynamic object to datasource
czmlDataSource.getDynamicObjectCollection().add(dynamicObject);

The only problem I see is that the function's parameter is mouseMoveEvent, but you are using movement.position.
You should decide what the name of the parameter is, and use it to get the position:

handler.setInputAction(
        function(movement){
          var pickedObject = scene.pick(movement.position);
          alert(pickedObject);
        },
        Cesium.ScreenSpaceEventType.LEFT_CLICK);