Skip to main content

NetworkAxisPosition

A class in Root.Township, Alta.Networking.

A NetworkAxisValue that syncs a transform's local position along one axis, between a minimum and maximum.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private float maximumValueBacking field for MaximumValue (default 1).
private float minimumValueBacking field for MinimumValue.

Properties​

MemberWhat it is
protected override float CurrentValue { get; }The local position projected on the axis.
protected override float MaximumValue { get; }Upper limit of the synced range.
protected override float MinimumValue { get; }Lower limit of the synced range.

Methods​

MemberWhat it is
protected override void ApplyValue(float value)Sets the local position to the axis times the value.
protected override float GetDifference(float currentValue, float value)Absolute difference between two values.
protected override float LerpToValue(float value, float lerpValue)Lerps from the current value toward the target.
1 private and internal method
MemberWhat it is
private void OnDrawGizmosSelected()Editor: draws the range of movement as a line.