C# Class FadeTextByRotation

Fade out text label in dial as it rotates away.
Uses the dot product between the parent of the label's forward direction and the forward direction of the label, passed through a curve filter to determine the opacity to set the text label to.
Inheritance: MonoBehaviour
Mostra file Open project: leapmotion/ImageGrid

Public Properties

Property Type Description
FadeCurve UnityEngine.AnimationCurve
ReferenceTransform_AutoDiscovered Transform

Public Methods

Method Description
Awake ( ) : void
OnEnable ( ) : void
Update ( ) : void

Private Methods

Method Description
registerReferenceTransform ( ) : bool

Finds and assigns a reference to the reference transform.

Method Details

Awake() public method

public Awake ( ) : void
return void

OnEnable() public method

public OnEnable ( ) : void
return void

Update() public method

public Update ( ) : void
return void

Property Details

FadeCurve public_oe property

Curve to translate dot product to opacity
public AnimationCurve,UnityEngine FadeCurve
return UnityEngine.AnimationCurve

ReferenceTransform_AutoDiscovered public_oe property

Reference for the "forward direction. AutoDiscovered.
AutoDiscovery: Uses the label's parent's parent (label -> dial center -> panel center) Autodiscovery can be overrriden by assigning the reference transform in the editor. "Forward" is assumed to be -z.
public Transform ReferenceTransform_AutoDiscovered
return Transform