I see you can click on entity/cube drawn. Is it possible to click and drag a cube so it changes its position based on where you drag and release it with your mouse?
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
After dragging the box I noticed that as you move the camera the box appears to slide around, not keeping up with the terrain. I couldn't figure out why though. Using console logs I can tell it's not executing the handler functions anymore.It would be neat if entities had a property called draggable.
--
handler.setInputAction(
function(click) {
if(dragging) {
dragging = false;
scene.screenSpaceCameraController.enableRotate = true;
var mypos = scene.camera.pickEllipsoid(click.position);
var cartographic = Cesium.Ellipsoid.WGS84.cartesianToCartographic(mypos);
cartographic.height = 300000.0;
var mypos = Cesium.Ellipsoid.WGS84.cartographicToCartesian(cartographic);
entity.position = mypos;
}
},
Cesium.ScreenSpaceEventType.LEFT_UP
);
This is crazy late, but I've created my own set of shape creation tools to be used with the latest versions of Cesium.
Drawhelper project was a great reference but hasn't been updated in quite a long time.
I will post back once I have everything ready for sharing.
Its still a bit rough at the moment but works very similarly.