Camera follow view for a particular missile

644 views
Skip to first unread message

Mohan Rajpoot

unread,
Feb 4, 2014, 6:07:39 AM2/4/14
to cesiu...@googlegroups.com
Hi guys,

I have created a program in which missile is moving from one place to another. Now i want to add a camera follow view for that missile.
For that purpose i have created another instance of cesium widget in right hand lower corner. But i am not able to adjust lookat for that missile. Can you provide me a direction how can i create camera follow view for that missile. That camera view update according to the missile position.

In CZML showcase some satellites are moving, similar to that i have created a missile. I want to add camera follow view also. 


please provide me some stuff for that.


thanks, 
mohan 

Poul Sørensen

unread,
Dec 8, 2014, 11:15:06 PM12/8/14
to cesiu...@googlegroups.com
Did you find an answer? I have done the same thing now and also want the camera to follow my object

OG

unread,
Dec 9, 2014, 10:19:58 PM12/9/14
to cesiu...@googlegroups.com
I use the following...

var entity = czmlDataSource.entities.getById('CZML ID of entity you want to track');
viewer.trackedEntity = entity; //Camera will now track entity

What did you do to create the "picture-in-picture" window?

Poul Sørensen

unread,
Dec 10, 2014, 12:31:02 PM12/10/14
to cesiu...@googlegroups.com, ow...@minutesmatter.com
I dont know what you mean by picture in picture :(

I found the EntityView in documentation that I used, but your example looks more clean.

var tracker = new Cesium.EntityView(czmlDataSource.entities.getById("Vehicle"), scene, scene.globe.ellipsoid);
 viewer
.clock.onTick.addEventListener(function (clock) {
               
                tracker
.update(clock.currentTime);
           
});

ow...@minutesmatter.com

unread,
Dec 10, 2014, 3:45:54 PM12/10/14
to cesiu...@googlegroups.com, ow...@minutesmatter.com
Poul,

I was talking about the OP who had added a 2nd instance of the viewer to a small overlay window similar to picture-in-picture on a TV.

OG
Reply all
Reply to author
Forward
0 new messages