Skip to main content

CorrectedRotationSlerp

A class in Root.Township, the global namespace.

Sets local rotation between two Euler angles from a progress value, through a correction curve.

Constructors​

MemberWhat it is
CorrectedRotationSlerp()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private Vector3 position0Euler angles at progress 0.
private Vector3 position1Euler angles at progress 1.
private AnimationCurve valueCorrectionCurve applied to progress first.

Methods​

MemberWhat it is
void SetRotation(float progress)Evaluates the curve, lerps between the two Euler angles and applies it.