Skip to main content

PositionLerp

A class in Root.Township, the global namespace.

Moves its object between two local positions by a progress value, for example from a UnityEvent.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private Vector3 position0Local position at progress 0.
private Vector3 position1Local position at progress 1.

Methods​

MemberWhat it is
void SetPosition(float progress)Sets the local position between position0 (0) and position1 (1).