# SetCameraRotationQuat

## Description

Sets the rotation of the specified camera using a quaternion. Alternatively you can use SetCameraRotation to use Euler angles. By default cameras are created with the quaternion 1,0,0,0 in the order w,x,y,z. A Quaternion is a 4 dimensional representation of a 3D rotation with the property w^2+x^2+y^2+z^2 = 1 which allows easy interpolation between two rotations by linearly interpolating the two quaternions and normalising them. Each 3D rotation is represented by exactly 2 quaternions, w,x,y,z and -w,-x,-y,-z so either version may be returned by the GetCameraQuat commands. Quaternions and Euler angles can both be used at the same time. For example setting a quaternion rotation will generate Euler representation that can be retrieved with GetCameraAngleX, etc.

## Definition

SetCameraRotationQuat( cameraID, w, x, y, z )

void agk::SetCameraRotationQuat( UINT cameraID, float w, float x, float y, float z )

## Parameters

- cameraID - The ID of the camera to modify, the main camera is ID 1.
- w - The W component of the quaternion.
- x - The X component of the quaternion.
- y - The Y component of the quaternion.
- z - The Z component of the quaternion.