Hi,
I was trying to run the following code in the Cesium-Sandcastle in Firefox (version 36.0.4). when i move the mouse over the aircraft model object, it can not be picked correctly. You can see check this problem in the console window.
But in Google Chrome it works fine.
//------------------------ Javascript Code----------------------------------//
var viewer = new Cesium.Viewer('cesiumContainer', {
infoBox : false,
selectionIndicator : false
});
function createModel(url, height) {
viewer.entities.removeAll();
var position = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, height);
var heading = Cesium.Math.toRadians(135);
var pitch = 0;
var roll = 0;
var orientation = Cesium.Transforms.headingPitchRollQuaternion(position, heading, pitch, roll);
var entity = viewer.entities.add({
name : url,
position : position,
orientation : orientation,
model : {
uri : url,
minimumPixelSize : 128
}
});
viewer.trackedEntity = entity;
}
createModel('../../SampleData/models/CesiumAir/Cesium_Air.bgltf', 5000.0);
var eventHandler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
eventHandler.setInputAction(function(event){
var object = viewer.scene.pick(event.endPosition);
// print the picked object...
console.log(object);
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
//-------------------------------------------------------------------------//
thanks,
Zhihang