Reputation: 161
I'm creating an application that we can play with MapControl camera changing looking direction (heading), roll angle, looking elevation (pitch) and field of view also (to zoom in or zoom out the scene).
When I start narrowing the angle of view, the camera starts gaining altitude, when nearer to the ground or surface of the map the more visible is the effect. Same happens when changing Pitch values, at certain angles camera gains altitude also.
I have checked the altitude values of camera location values and MapControl.ActualCamera.Location.Position.Altitude
values are always the same. This effect is more visible when camera is just "stuck" to the ground (despite that there's always like 20 meters or so of difference between the camera and the ground.
This is the code I use to set altitude of the MapCamera, the Pitch, FoV, ...
newCamera = new MapCamera(cameraVR.GroundGeopoint, cameraVR.Heading, cameraVR.Pitch, cameraVR.Roll, cameraVR.FoV);
MapScene mapScene = MapScene.CreateFromCamera(newCamera);
mapPosition.TrySetSceneAsync(mapScene, MapAnimationKind.None);
GroundGeopoint is the location of the camera "stuck" to the ground, even if it's alaways levitating some meters above the ground.
Upvotes: 0
Views: 200
Reputation: 161
Roll applied to the MapCamera and a small FoV (eq. to 93mm camera lens), showing a very low poly scene. There's no difference of detail in wider or narrower FoV. I expected to have more detail in further surface mesh and texture. MapCamera altitude tells 2042.64m (lower left side of the screenshot).
With 35mm camera lens, shows the same detail of the mountains in the center of the screenshot as the zoomed version. MapCamera 1979.63m of altitude. There's a difference of more than 60m only for changing FoV.
Upvotes: 0
Reputation: 1772
Changing pitch will change the reported camera altitude. This is fully expected. As you pitch the camera relative to the surface, it will approach the surface. You're moving the camera on a sphere anchored around the center point. For example if you request a pitch of 45 degrees I would expect your altitude to decrease by a factor of 1.4. Changing the Field of view should generally not change the altitude, with one minor exception - a FOV change will probably cause the level of detail shown to change. As higher or lower levels of detail are loaded, there may be some minor shifts in reported altitude due to the accuracy of the data, but I would not expect these to be significant. There is also a minimum altitude that is enforced which you may be running into. The minimum altitude is dependent on the resolution of the source data and is generally around 50m. Changing roll is currently not supported.
Upvotes: 0