My idea is that when pressing the Alt key and holding down the left mouse button, instead of dragging the Earth, a small sphere will be generated that follows the movement of the mouse. This is to facilitate marking the x and y coordinates. When holding down the Alt key and scrolling up with the mouse wheel, the sphere will rise, and scrolling down will make it descend. This is to facilitate marking the altitude coordinate. However, when I press the Alt key, Cesium freezes. I sincerely request assistance!
And here is a part of my code:
handler.setInputAction(() => {
isLeftDown.value = true
}, Cesium.ScreenSpaceEventType.LEFT_DOWN)
handler.setInputAction(() => {
isLeftDown.value = false
}, Cesium.ScreenSpaceEventType.LEFT_UP)
handler.setInputAction(
movement => {
if (!isLeftDown.value) return
const cartesian = viewer.camera.pickEllipsoid(
movement.endPosition,
scene.globe.ellipsoid
)
entity.position = cartesian
},
Cesium.ScreenSpaceEventType.MOUSE_MOVE,
Cesium.KeyboardEventModifier.ALT
)