# SetObjectRotationQuat

## Description

Sets the rotation of the specified object using a quaternion. Alternatively you can use *SetObjectRotation* to use Euler angles. By default objects 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 GetObjectQuat commands. Quaternions and Euler angles can both be used at the same time. For example setting a quaternion rotation will generate equivalent Euler values that can be retrieved with *GetObjectAngleX*, *GetObjectAngleX*, and *GetObjectAngleZ*.

## Definition

SetObjectRotationQuat( objID, w, x, y, z )

void agk::SetObjectRotationQuat( UINT objID, float w, float x, float y, float z )

## Parameters

*objID* - The ID of the object to modify.*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.