Skip to main content

RotationSlerp

A class in Root.Township, the global namespace.

Sets its local rotation between two Euler angle sets from a 0 to 1 progress value. Driven by events such as float animation updates.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private Vector3 position0Euler angles at progress 0.
private Vector3 position1Euler angles at progress 1.

Methods​

MemberWhat it is
void SetRotation(float progress)Lerps the Euler angles between the two ends by progress and applies them as local rotation.