I am trying to add a simple tool that measures straight line distance between two points using scene.pickPosition and scene.globe.pick.
It worked fine until the recent Chrome version (56.0.2924.87), scene.pickPosition would return undefined or incorrect position. Has anyone experienced this issue?
What version of Cesium are you using? We recently made some improvements to pickPosition, so I would recommend upgrading to the most recent version of Cesium, 1.31.
Let me know if you still see problems in the latest version.
model = scene.pick(screenPosition);
console.info('model',model);
if (Cesium.defined(model) && scene.pickPositionSupported) {
modelPosition = scene.pickPosition(screenPosition);
}
console.info('modelPosition',modelPosition);
In Chrome (56.2924.87), terrainPosition would return normally and model would return a primitive when mouse is hovering about a glb model. However, with a selected model and scene.pickPositionSupported returning true, modelPosition would return undefined.
We have also tried the above in Chrome Canary (58.0.3026.0) and everything seems to be returning normally.
One of our co-work said he once read a post that this maybe grahpics card related? We are currently testing on windows 8 with AMD Radeon HD 8570 with driver version 21.19.407.0. if this is of any help.
Alright, if that demo is working then there may be something in your code that is causing the position to return incorrectly. It’s really hard for me to say what’s going on without seeing a full code example, but see if you can find any differences between our pickPosition demo and what your code is doing.
updated the graphics card driver, google chrome and Firefox to the newest release. But the problem still keeps.
activate WebGL draft extensions in Chrome://flags
check the WebGL report: my firefox has WEBG_depth_texture in its WebGL1 list but google chrome not. But both of them failed with the above mentioned demo.