Select platform: [Android](https://developers.google.com/maps/documentation/maps-3d/android-sdk/custom-camera-paths.md.txt "View this page for the Android platform docs.") [iOS](https://developers.google.com/maps/documentation/maps-3d/ios-sdk/custom-camera-paths.md.txt "View this page for the iOS platform docs.") [JavaScript](https://developers.google.com/maps/documentation/javascript/3d/animate-camera.md.txt "View this page for the JavaScript platform docs.")

<br />

You can add camera path animations to your 3D map to provide a more immersive
experience for your users. Camera path animations can fly to, fly around, or be
combined to animate the
[`Camera`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera.md.txt)
to a point on the map, including specifying its


altitude

and
[`altitudeMode`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera.md.txt#altitudeMode()).

When configuring a
[`Camera`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera.md.txt)
for an animation, you can set the
[`altitudeMode`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera.md.txt#altitudeMode())
property (or call
[`setAltitudeMode`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera.md.txt#setAltitudeMode(int)))
to specify how the camera's altitude is interpreted:

- [`AltitudeMode.ABSOLUTE`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode.md.txt#ABSOLUTE()): Interprets the altitude as meters above mean sea level (the default value if not specified).
- [`AltitudeMode.RELATIVE_TO_GROUND`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode.md.txt#RELATIVE_TO_GROUND()): Interprets the altitude as meters above the ground surface at the camera's center point.
- [`AltitudeMode.RELATIVE_TO_MESH`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/AltitudeMode.md.txt#RELATIVE_TO_MESH()): Interprets the altitude as meters above the highest 3D mesh surface (such as buildings or trees) at the camera's center point.

> [!NOTE]
> **Note:** `AltitudeMode` can only be used by `flyTo` and `flyAround`. Setting `AltitudeMode` in the `camera` will have no effect on how altitude is interpreted. `getCamera` always returns the camera position in `ABSOLUTE` mode.

## Fly to

The following code sample demonstrates how to animate the
[`Camera`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera.md.txt)
to fly to a specific point on a 3D map by calling the
[`flyCameraTo`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D.md.txt#flyCameraTo(com.google.android.gms.maps3d.model.FlyToOptions))
method on
[`GoogleMap3D`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D.md.txt)
with a
[`FlyToOptions`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyToOptions.md.txt)
configuration.

```kotlin
// Add imports and define constants
import com.google.android.gms.maps3d.model.AltitudeMode
import com.google.android.gms.maps3d.model.FlyToOptions
import com.google.android.gms.maps3d.model.FlyAroundOptions
import com.google.android.gms.maps3d.model.Camera
import com.google.android.gms.maps3d.model.Map3DMode
import com.google.android.gms.maps3d.model.latLngAltitude
const val EMPIRE_STATE_BUILDING_LATITUDE = 40.748233
const val EMPIRE_STATE_BUILDING_LONGITUDE = -73.985663

// Add to the onMap3DViewReady method, after the googleMap3D object has been initialized
googleMap3D.setMapMode(Map3DMode.HYBRID)
googleMap3D.flyCameraTo(
    flyToOptions {
        endCamera = camera {
            center = latLngAltitude {
                latitude = EMPIRE_STATE_BUILDING_LATITUDE
                longitude = EMPIRE_STATE_BUILDING_LONGITUDE
                altitude = 212.0 // in meters
            }
            heading = 34.0 // bearing in degrees
            tilt = 67.0 // relative to vertical
            range = 750.0 // distance away from the focal point in meters
            roll = 0.0 // roll relative to horizontal
            altitudeMode = AltitudeMode.RELATIVE_TO_GROUND
        }
        durationInMillis = 2000
    }
)
```

## Fly around

The following code sample demonstrates how to animate the
[`Camera`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/Camera.md.txt)
to fly around a specific point on a 3D map by calling the
[`flyCameraAround`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D.md.txt#flyCameraAround(com.google.android.gms.maps3d.model.FlyAroundOptions))
method on
[`GoogleMap3D`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D.md.txt)
with a
[`FlyAroundOptions`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/FlyAroundOptions.md.txt)
configuration.

```kotlin
// Add imports and define constants
import com.google.android.gms.maps3d.model.AltitudeMode
import com.google.android.gms.maps3d.model.Map3DMode
import com.google.android.gms.maps3d.model.latLngAltitude
const val EMPIRE_STATE_BUILDING_LATITUDE = 40.748233
const val EMPIRE_STATE_BUILDING_LONGITUDE = -73.985663

// Add to the onMap3DViewReady method, after the googleMap3D object has been initialized
googleMap3D.setMapMode(Map3DMode.HYBRID)
googleMap3D.flyCameraAround(
    flyAroundOptions {
        center = camera {
            center = latLngAltitude {
                latitude = EMPIRE_STATE_BUILDING_LATITUDE
                longitude = EMPIRE_STATE_BUILDING_LONGITUDE
                altitude = 212.0
            }
            heading = 34.0
            tilt = 67.0
            range = 750.0
            roll = 0.0
            altitudeMode = AltitudeMode.RELATIVE_TO_GROUND
        }
        durationInMillis = 5000
        rounds = 1.0 // Number of rotations - can be fractional
    }
)
```