Skip to main content

WorldLerpAngle

A class in Root.Township, the global namespace.

Makes this transform lag behind its parent's rotation, smoothing it in world space. Put it on a child.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private Quaternion lastRotationThe smoothed world rotation from last frame.
private float lerpSmoothing speed. Higher follows the parent faster.

Methods​

2 private and internal methods
MemberWhat it is
private void LateUpdate()Lerps the stored rotation toward the parent's by lerp per second and applies it.
private void OnEnable()Snaps to the parent's rotation.