I have implemented a custom selection tool for my geographic video game and now I am wondering how to efficiently implement a tool for unit multi-selection tool. The idea is that MOUSE_DOWN+MOUSE_MOVE will draw a translucent rectangle on the screen that will select multiple units (entites) on the map just like in many well known RTS games.
The ways I see this can be done are:
Draw a poligon using Cesium.PolygonGraphics.
Draw an overlaying canvas with 2d context and communicate events between Cesium.
Draw a poligon using standard webgl functionality using the webgl context from Cesium.Scene#canvas
Add a transparent div overlay.
I think that option #1 seems to be the best but I’m not sure how to translate the point coordinates from canvas position to cartesian3.
Thanks for any tips you may have!