Best way to draw RTS-style selection box?

Hi,

A quick question:

On our product we allow the user to select a given Entity via mouse click. We provide user feedback via color and scale changes, but that doesn’t prove very effective in low-contrast scenarios in which the Entity is represented in colors similar to the ground and sky.

We have been debating the best way to do such a selection box, which would ideally look similar to those partial cornered boxes inspire from the RTS game world.

I just noticed that the SatelliteViewer demo at:

http://apps.agi.com/SatelliteViewer/?Status=Operational

Gives quite a clear indication on which satellite is selected, and does so with what seems to be an overlay, or screen-space designed widget.

Can any one describe or give us some pointers on how was this achieved? The Cesium API doesn’t seem to have straightforward support to implement this.

Thanks in advance,

This is out-of-the-box functionality. If you are using the DataSource layer (i.e. CZML or GeoJSON) this comes for free as part of viewerEntityMixIn. If you want to do things manually (or outside of the DataSource layer) you can use the SelectionIndicator widget directly (http://cesiumjs.org/Cesium/Build/Documentation/SelectionIndicator.html). You can look at the code in viewerEntityMixIn.js for an example of using it. At some point we’ll have a Sandcastle example I’m sure.