scene.pickPosition Bug in latest Versioin 1.31

i want to draw a polygon on surface ( clamp to terrain) use scene.pickPosition,but i get incorrect position

see http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Hello%20World.html&label=Showcases&gist=0303b6067ef873070cb72520b346a6bb

Hi there,

You can correct the issue in your example by replacing

var cartesian = scene.pickPosition(movement.endPosition);

``

with

    var ray = viewer.camera.getPickRay(movement.position);
    var cartesian = viewer.scene.globe.pick(ray, viewer.scene);

``

getPickRay will get you a more precise position.

Best,

  • Rachel
1 Like

It works fine,thank you Rachel Hwang !

在 2017年3月29日星期三 UTC+8上午1:46:32,Rachel Hwang写道: