Skip to main content

AnimatedLayerWeightLerp

A class in Root.Township, Alta.Networking.Animation.

A networked layer weight that eases towards a new value instead of jumping. Big changes past snapThreshold jump at once.

Constructors​

MemberWhat it is
AnimatedLayerWeightLerp(string name)Creates an AnimatedLayerWeightLerp from name.

Fields​

MemberWhat it is
bool isLerpingTrue while the weight is easing towards the target.
3 private and internal fields
MemberWhat it is
private float lerpProgressSeconds to ease across the full 0 to 1 range (default 0.1).
private float snapThresholdChanges this large or larger jump at once. Off when 0 or less (the default -1).
private float targetThe weight being eased towards.

Properties​

MemberWhat it is
override string GUIName { get; }Debug name with the target and whether it is easing.
override float Value { get; set; }Setting it sets the target and starts easing (or snaps if the jump is past the threshold), marking the value changed for sync.

Methods​

MemberWhat it is
void Lerp()Moves the weight one frame's step towards the target and applies it. Call it each frame.
void Snap(float value)Sets the weight and target at once with no easing, marks it changed and applies it.

Used in​

Members of other types that take, return or hold a AnimatedLayerWeightLerp: