i want to draw a polygon on surface ( clamp to terrain) use scene.pickPosition,but i get incorrect position
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写道: