MoveToTarget Class

Definition

This class provides functionality to move the hand hint from a tracking position to a target position over time.

C++
public ref class MoveToTarget : UnityEngine::MonoBehaviour
Inheritance
UnityEngine.MonoBehaviour
MoveToTarget

Constructors

Properties

AnimationCurve

Lerp curve that controls the animation position over time from the trackingObject to the targetObject.

Duration

Duration of move from tracking object to target object in seconds.

RootObject

Shared parent between tracking and target objects used for relative local positions.

TargetObject

Target to move to.

TargetOffset

Tunable offset to get the GameObject to arrive at the right target position.

TrackingObject

Object to track.

Methods

Follow()

Starts coroutine to follow the target object.

MoveToTargetPosition()

Starts coroutine to lerp from current position to target position

Applies to

Product Versions
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4