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
| Name | Type | Default | Meaning |
|---|---|---|---|
From | const float | — | Unit normal the instance stands on now. |
To | const float | — | Unit normal of the ground it should stand on. |
MaxAngle_deg | float | — | The largest angle; a turn beyond it is cut to it, about the same axis. |
OutQuat | float | — | x y z w, a unit quaternion. |
Returns
false when the turn is negligible (OutQuat is then the identity).
Note.
Pure, any thread.