Closed OmarShehata closed 1 year ago
For turning off the widget, see #6991
BaseLayerPicker secretly sets globe.depthTestAgainstTerrain = true
. pickPosition
only works decently well when it's set to true
, so when the widget isn't included depthTestAgainstTerrain
is false and pickPosition
stops working.
I agree that the example would be better using globe.pick
instead for picking terrain. I would only recommend using pickPosition
for picking the exact position on a 3D tiles or glTF model.
Closing this as the root issue is https://github.com/CesiumGS/cesium/issues/4368.
It came up on the forum that setting
baseLayerPicker: false
makesscene.pickPosition
report an incorrect position.I was about to open a bug for this since I don't think turning off the widget should change this behavior (right?) when I tried @hpinkos 's suggestion here to use
globe.pick
instead, and that works pretty well.You can test this in this Sandcastle by turning off the widget and trying to draw:
https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Drawing%20on%20Terrain.html
This issue is to at least change the Sandcastle to use
globe.pick
if that's a more stable function. Should there be a separate issue for the baseLayerPicker or should I just make a comment in the scene.pickPosition returns incorrect position issue?