Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainCore module · function

Native::

NormalTurn

The rotation that takes the unit normal From to the unit normal To, its angle clamped.

Declaration

bool NormalTurn(const float From[3], const float To[3], float MaxAngle_deg, float OutQuat[4]);
Header
#include "Native/GroundFollow.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrainCore"); in your module’s Build.cs.
Stability
Stable: changes within a major version only add.
Thread
Pure, any thread.

Parameters

NameTypeDefaultMeaning
Fromconst float—

Unit normal the instance stands on now.

Toconst float—

Unit normal of the ground it should stand on.

MaxAngle_degfloat—

The largest angle; a turn beyond it is cut to it, about the same axis.

OutQuatfloat—

x y z w, a unit quaternion.

Returns

false when the turn is negligible (OutQuat is then the identity).

Note.

Pure, any thread.