-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Picking bug #2942
Comments
#3010 does not fix this. |
I can no longer reproduce this. Maybe we accidentally fixed it. Can someone confirm this and close if it's fixed. Thanks. |
I can still reproduce this in Firefox 41 on Mac in master. |
Okay, maybe it's not all machines, I'll have to check my desktop (which is where I originally encountered the problem). Thanks. |
Updated code example: 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, new Cesium.HeadingPitchRoll(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.glb', 5000.0);
var eventHandler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
eventHandler.setInputAction(function(event){
var object = viewer.scene.pick(event.endPosition);
if(!object){
console.log(object);
}
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE); I can't reproduce this in Firefox 53 or Chrome 59 on Mac. |
From the forum
Using Firefox, run the below code in Sandcastle and switch to the Console tab to see output. Mouse over the center of the plane and make small circular motions (staying over the plane). As long as you stay on the plane object, nothing should appear in the console, however, occasionally the pick fails even though you are definitely on the plane and therefore prints undefined.
This happens in IE with less frequency and does happen (rarely) in Chrome. I'm pretty sure the mouse move event is correct and the bug is somewhere in the picking code.
The text was updated successfully, but these errors were encountered: