C4 Engine
C4 Engine API Documentation

CharacterController::SetCharacterOrientation

Defined in:  C4Character.h
Sets the orientation of a character model.
Prototype

void SetCharacterOrientation(float azimuth, float roll = 0.0F);

Parameters
azimuth The angle in the x-y plane representing the direction the character is facing.
roll The roll angle about the character's local x axis.
Description
The SetCharacterOrientation function sets the orientation of a character model to the angles specified by the azimuth and roll parameters. The azimuth angle is measured counterclockwise in the x-y plane, and zero corresponds to the positive x axis. If the roll angle is not zero, then the character is rotated about the x axis by the angle specified by the roll parameter before the azimuth rotation is applied.

The SetCharacterOrientation function should always be called to change the orientation of a character using the CharacterController class instead of setting the transform directly. When the orientation of a character is changed, the Shape subnode is transformed in the inverse manner so that it always maintains a fixed orientation in the world.