How do I let the user pick a position in the scene?
This is the most common shape a Plugin takes: the user clicks something in the 3D scene, a marker appears where they clicked, and the Plugin does something with that position. Placing an asset, dropping a note, starting a measurement and reading a coordinate are all the same three steps.
A Cursor bar Plugin is the right location for it. Enabling the tool starts the pick, and the Plugin's dispose function ends it, so the user turning the tool off cleans up without the Plugin tracking any state of its own.
Resolving a screen position to a world position
Cesium offers several ways to turn a mouse position into a world position and they do not agree: picking the globe ignores tilesets, picking the ellipsoid ignores terrain, and picking a primitive misses ground. bruce-cesium resolves all of that in one place, as DrawingUtils.GetAccuratePosition.
A complete picker
The pattern below tracks the cursor while the tool is enabled, places a marker on click, and disposes everything it created.