C# Class HoloToolkit.Unity.Interpolator

A MonoBehaviour that interpolates a transform's position, rotation or scale.
Inheritance: UnityEngine.MonoBehaviour
Mostrar archivo Open project: Microsoft/HoloToolkit-Unity Class Usage Examples

Public Methods

Method Description
Awake ( ) : void
NonLinearInterpolateTo ( Vector3 start, Vector3 target, float deltaTime, float speed ) : Vector3

Interpolates smoothly to a target position.

Reset ( ) : void

Stops the transform in place and terminates any animations.

SetTargetLocalRotation ( Quaternion target ) : void

Sets the target local rotation for the transform and if rotation wasn't already animating, fires the InterpolationStarted event.

SetTargetLocalScale ( Vector3 target ) : void

Sets the target local scale for the transform and if scale wasn't already animating, fires the InterpolationStarted event.

SetTargetPosition ( Vector3 target ) : void

Sets the target position for the transform and if position wasn't already animating, fires the InterpolationStarted event.

SetTargetRotation ( Quaternion target ) : void

Sets the target rotation for the transform and if rotation wasn't already animating, fires the InterpolationStarted event.

SnapToTarget ( ) : void

Snaps to the final target and stops interpolating

StopInterpolating ( ) : void

Stops the interpolation regardless if it has reached the target

Update ( ) : void

Method Details

Awake() public method

public Awake ( ) : void
return void

NonLinearInterpolateTo() public static method

Interpolates smoothly to a target position.
public static NonLinearInterpolateTo ( Vector3 start, Vector3 target, float deltaTime, float speed ) : Vector3
start UnityEngine.Vector3 The starting position.
target UnityEngine.Vector3 The destination position.
deltaTime float Caller-provided Time.deltaTime.
speed float The speed to apply to the interpolation.
return UnityEngine.Vector3

Reset() public method

Stops the transform in place and terminates any animations.
public Reset ( ) : void
return void

SetTargetLocalRotation() public method

Sets the target local rotation for the transform and if rotation wasn't already animating, fires the InterpolationStarted event.
public SetTargetLocalRotation ( Quaternion target ) : void
target UnityEngine.Quaternion The new target local rotation for the transform.
return void

SetTargetLocalScale() public method

Sets the target local scale for the transform and if scale wasn't already animating, fires the InterpolationStarted event.
public SetTargetLocalScale ( Vector3 target ) : void
target UnityEngine.Vector3 The new target local rotation for the transform.
return void

SetTargetPosition() public method

Sets the target position for the transform and if position wasn't already animating, fires the InterpolationStarted event.
public SetTargetPosition ( Vector3 target ) : void
target UnityEngine.Vector3 The new target position to for the transform.
return void

SetTargetRotation() public method

Sets the target rotation for the transform and if rotation wasn't already animating, fires the InterpolationStarted event.
public SetTargetRotation ( Quaternion target ) : void
target UnityEngine.Quaternion The new target rotation for the transform.
return void

SnapToTarget() public method

Snaps to the final target and stops interpolating
public SnapToTarget ( ) : void
return void

StopInterpolating() public method

Stops the interpolation regardless if it has reached the target
public StopInterpolating ( ) : void
return void

Update() public method

public Update ( ) : void
return void