How to track a moving billboard?

hi,
I have made a moving billboard,and I want to track this moving billboard and observer it in a certain view.I can obtain the billboard’s position,then what shoud I do next?Who can tell me ?Appreciate it very much!

Hello,

One way to do this is to set the viewer.trackedEntity property with your billboard. The camera will lock onto the billboard and follow it.

Here’s a code example:

var viewer = new Cesium.Viewer(‘cesiumContainer’, {timeline : false, animation : false});

var pinBuilder = new Cesium.PinBuilder();

var lon = -70;

var lat = -39;

var bluePin = viewer.entities.add({

name : ‘Blank blue pin’,

position : Cesium.Cartesian3.fromDegrees(lon, lat),

billboard : {

image : pinBuilder.fromColor(Cesium.Color.ROYALBLUE, 48).toDataURL(),

verticalOrigin : Cesium.VerticalOrigin.BOTTOM

}

});

viewer.trackedEntity = bluePin;

setInterval(function(){

lon += 0.00001;

bluePin.position = Cesium.Cartesian3.fromDegrees(lon, lat);

}, 30);

``

Best,

Hannah

It’s awesome,thanks very much!

在 2015年7月31日星期五 UTC+8上午1:23:42,Hannah Pinkos写道: