Edit

Share via


Follow Class

Definition

Follow solver positions an element in front of the of the tracked target (relative to its local forward axis). The element can be loosely constrained (a.k.a. tag-along) so that it doesn't follow until the tracked target moves beyond user defined bounds.

public ref class Follow : Microsoft::MixedReality::Toolkit::Utilities::Solvers::Solver
[UnityEngine.AddComponentMenu("Scripts/MRTK/Experimental/Solver/Follow")]
public class Follow : Microsoft.MixedReality.Toolkit.Utilities.Solvers.Solver
[<UnityEngine.AddComponentMenu("Scripts/MRTK/Experimental/Solver/Follow")>]
type Follow = class
    inherit Solver
Public Class Follow
Inherits Solver
Inheritance
UnityEngine.MonoBehaviour
Follow
Attributes
UnityEngine.AddComponentMenuAttribute

Constructors

Follow()

Fields

pitchOffset
SolverHandler

The handler reference for this solver that's attached to this GameObject

(Inherited from Solver)

Properties

AngularClampMode

Accessors for specifying the method used to ensure the refForward vector remains within the bounds set by the leashing parameters.

BoundsScaler

Scales the bounds to impose a larger or smaller bounds than the calculated bounds.

DefaultDistance

Initial placement distance. Should be between min and max.

FaceTrackedObjectWhileClamped

The object will face the tracked object while the object is outside of the distance/direction bounds defined in this component.

FaceUserDefinedTargetTransform

Face a user defined transform rather than using the solver orientation type.

GoalPosition

The final position to be attained

(Inherited from Solver)
GoalRotation

The final rotation to be attained

(Inherited from Solver)
GoalScale

The final scale to be attained

(Inherited from Solver)
IgnoreAngleClamp

Option to ignore angle clamping.

IgnoreDistanceClamp

Option to ignore distance clamping.

IgnoreReferencePitchAndRoll

Option to ignore the pitch and roll of the reference target

MaxDistance

Max distance from eye to element.

MaxViewHorizontalDegrees

The horizontal angle from the tracked target forward axis to this object will not exceed this value.

MaxViewVerticalDegrees

The vertical angle from the tracked target forward axis to this object will not exceed this value.

MinDistance

Min distance from eye to position element around, i.e. the sphere radius.

MoveLerpTime

If 0, the position will update immediately. Otherwise, the greater this attribute the slower the position updates

(Inherited from Solver)
OrientationType

The desired orientation of this object.

OrientToControllerDeadzoneDegrees

The element will not reorient until the angle between the forward vector and vector to the controller is greater then this value.

PitchOffset

Pitch offset from reference element (relative to MaxDistance).

PivotAxis

Rotation axes used when facing target.

ReorientWhenOutsideParameters

The element will only reorient when the object is outside of the distance/direction bounds above.

RotateLerpTime

If 0, the rotation will update immediately. Otherwise, the greater this attribute the slower the rotation updates")]

(Inherited from Solver)
ScaleLerpTime

If 0, the scale will update immediately. Otherwise, the greater this attribute the slower the scale updates

(Inherited from Solver)
Smoothing

If true, updates are smoothed to the target. Otherwise, they are snapped to the target

(Inherited from Solver)
TargetToFace

Transform this object should face rather than using the solver orientation type.

TetherAngleSteps

The division of steps this object can tether to. Higher the number, the more snapping steps.

UpdateLinkedTransform

If true, the position and orientation will be calculated, but not applied, for other components to use

(Inherited from Solver)
VerticalMaxDistance

Max vertical distance between element and reference.

WorkingPosition

Automatically uses the shared position if the solver is set to use the 'linked transform'. UpdateLinkedTransform may be set to false, and a solver will automatically update the object directly, and not inherit work done by other solvers to the shared position

(Inherited from Solver)
WorkingRotation

Rotation version of WorkingPosition

(Inherited from Solver)
WorkingScale

Scale version of WorkingPosition

(Inherited from Solver)

Methods

AddOffset(Vector3)

Add an offset position to the target goal position.

(Inherited from Solver)
Awake() (Inherited from Solver)
OnDestroy() (Inherited from Solver)
OnEnable()
RecalculateBoundsExtents()

Recalculates the bounds based on the angular clamp mode.

Recenter()

Re-centers the target in the next update.

SnapGoalTo(Vector3, Quaternion, Vector3)

SnapGoalTo only sets the goal orientation. Not really useful.

(Inherited from Solver)
SnapGoalTo(Vector3, Quaternion)
Obsolete.

SnapGoalTo only sets the goal orientation. Not really useful.

(Inherited from Solver)
SnapTo(Vector3, Quaternion, Vector3)

Snaps the solver to the desired pose.

(Inherited from Solver)
SnapTo(Vector3, Quaternion)
Obsolete.

Snaps the solver to the desired pose.

(Inherited from Solver)
SolverUpdate()

Should be implemented in derived classes, but Solver can be used to flush shared transform to real transform

SolverUpdateEntry()

Tracks lifetime of the solver, disabling it when expired, and finally runs the orientation update logic

(Inherited from Solver)
Start() (Inherited from Solver)
UpdateTransformToGoal()

Updates all object orientations to the goal orientation for this solver, with smoothing accounted for (smoothing may be off)

(Inherited from Solver)
UpdateWorkingPositionToGoal()

Updates only the working position to goal with smoothing, if enabled

(Inherited from Solver)
UpdateWorkingRotationToGoal()

Updates only the working rotation to goal with smoothing, if enabled

(Inherited from Solver)
UpdateWorkingScaleToGoal()

Updates only the working scale to goal with smoothing, if enabled

(Inherited from Solver)
UpdateWorkingToGoal()

Updates the Working orientation (which may be the object, or the shared orientation) to the goal with smoothing, if enabled

(Inherited from Solver)

Applies to