# SetCameraAspect

## Description

Sets the camera aspect ratio when rendering 3D. The default is GetDeviceWidth()/GetDeviceHeight() and provides a realistic 3D projection. If the device backbuffer size changes, for example if the device changes orientation, or the window size is changed, or SetScreenResolution is called, then this value will reset to its default.

## Definition

SetCameraAspect( cameraID, aspect )

void agk::SetCameraAspect( UINT cameraID, float aspect )

## Parameters

- cameraID - The ID of the camera to modify, the main camera is ID 1.
- aspect - The new aspect ratio to use.