# Camera Settings

You can set camera rotation (left-right, up-down), field of view, altitude, movement, and viewpoint.

* Camera Tilt: Rotation up and down
* Camera Direct: Rotation left and right
* Camera Fov: Field of view
* Camera Altitude: Altitude

<div data-full-width="false"><figure><img src="https://1795047649-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5XGtJpCeshsOUxP9TcXO%2Fuploads%2FzD9tHRt3nyXYm9Fj80mW%2Fcamera.png?alt=media&#x26;token=dfc7c251-013d-4169-ac05-d88c47e281a9" alt="" width="563"><figcaption></figcaption></figure></div>

## Up-Down (Tilt) Rotation

> Rotate the camera up and down.
>
> * Tilt < 0 : Rotate upwards.
> * Tilt = 0 : Frontal view.
> * Tilt > 0 : Rotate downwards.

```javascript
Module.getViewCamera().setTilt(90); // Vertical to the terrain (looking at the terrain)
Module.getViewCamera().setTilt(0); // Horizontal to the terrain
Module.getViewCamera().setTilt(-90); // Vertical to the terrain (back to the terrain)
```

## Left-Right (Direct) Rotation

> Rotate the camera left and right (-180 to 180).
>
> * 0 : North.
> * -90 : East.
> * -180, 180 : South.
> * 90 : West.

````javascript
Module.getViewCamera().setDirect(0);	// Facing North
Module.getViewCamera().setDirect(-90);	// Facing East
Module.getViewCamera().setDirect(-180);	// Facing South
Module.getViewCamera().setDirect(90);	// Facing West

## Field of View (Fov) Setting

> Set the camera's field of view (default is 45).

```javascript
Module.getViewCamera().setFov(45);
````

## Altitude Setting

> Set the camera's altitude.

```javascript
Module.getViewCamera().setAltitude(1000);
```

## Location Setting

> Set the camera's location (longitude, latitude, altitude).

```javascript
Module.getViewCamera().setLocation(new Module.JSVector3D(127.06205102069177, 37.50848251498306, 51.0700191501528));
```

## Viewpoint Setting

> Set the camera's viewpoint.
>
> * true : First-person.
> * false : Third-person.

```javascript
Module.getViewCamera().setMoveMode(true); // First-person
Module.getViewCamera().setMoveMode(false); // Third-person
```
