0

Flights Demo - Rotate into View

Anonymous 10 years ago 0
This discussion was imported from CodePlex

crashedapp wrote at 2011-01-28 18:37:

Looking at the Flights Demo.

If I click on the model of earth - how would I go about moving the camera so it is directly looking at the point - giving the effect that the globe spun to that point etc...??

I tried view1.lookat... - it appears to just to pan.

-Great Project by the way!

 

private void OnMouseDown(object sender, MouseButtonEventArgs e) {

 var pt = view1.FindNearestPoint(e.GetPosition(view1));

 

if (pt.HasValue) {//todo rotate to clicked point}

 }

 

 

 

 

 

// Flights Demo window.xaml.cs - modify to sping glope so click point is centered in view


objo wrote at 2011-01-28 18:58:

I would like to get a Google Earth camera behaviour in that demo, but I'm not sure how to do this yet. Camera position and direction should be defined by lat, lon, altitude, heading and tilt...

The LookAt method changes the position of the camera and keeps the direction fixed.