Show / Hide Table of Contents

Method RotateTo

RotateTo(double, double, double)

Returns a new Camera with the specified heading, pitch and roll values.

Declaration
public Camera RotateTo(double heading, double pitch, double roll)
Parameters
Type Name Description
double heading

The angle around the z-axis at which the new camera is rotated. The angle is clockwise from north in the East, North, Up (ENU) ground reference frame. The value is between 0 and 360, where 0 is looking North and 90 is looking East. Values are wrapped modulo 360 (for example, 370 becomes 10).

double pitch

The angle around the x-axis at which the new camera is rotated in the East, North, Up (ENU) ground reference frame. The value is between 0 and 180, where 0 is looking straight down, 90 is looking towards the horizon, and 180 is looking straight up. Pitch values are clamped to this range: a negative value defaults to 0 and a value greater than 180 defaults to 180. If the behavior of a negative pitch is required, then the corresponding transformation with positive pitch can be set instead. For example, if heading:0 pitch:-20 roll:0 is required then heading:180 pitch:20 roll:180 can be used instead.

double roll

The angle around the y-axis (the direction of sight) at which the new camera is rotated in the East, North, Up (ENU) ground reference frame. Positive values rotate counterclockwise in view space (for example, when looking north, 90 means the top of the screen points west). The value is between 0 and 360, where 0 is horizontal and 180 is upside down. Values are wrapped modulo 360 (for example, 370 becomes 10).

Returns
Type Description
Camera

Camera

Exceptions
Type Condition
ArgumentException

Invalid argument.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.8
.NET100.13 - 300.0
.NET Windows100.13 - 300.0
.NET Android200.0 - 300.0
.NET iOS200.0 - 300.0
.NET Framework100.0 - 200.8
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.