# SetObjectBoneLookAt

## Description

Rotates the bone to look at a particular point in world space with an optional roll value. "looking at" is defined as aligning the bone's local Z axis to point its positive side at the given point. This can be achieved using only the Y and X angles in Euler notation, so you can specify an optional Z angle in degrees to roll the bone left of right whilst always looking at the same spot.

## Definition

SetObjectBoneLookAt( objID, boneIndex, x, y, z, roll )

void agk::SetObjectBoneLookAt( UINT objID, UINT boneIndex, float x, float y, float z, float roll )

## Parameters

*objID* - The ID of the object that contains the bone.*boneIndex* - The index of the bone to modify.*x* - The X component of the position to look at.*y* - The Y component of the position to look at.*z* - The Z component of the position to look at.*roll* - The Z angle to roll the bone when looking at the given position, negative is clockwise.