Class Follow
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.
Namespace: Microsoft.MixedReality.Toolkit.Experimental.Utilities
Assembly: cs.temp.dll.dll
Syntax
public class Follow : Solver
Fields
pitchOffset
Declaration
public float pitchOffset
Field Value
Type | Description |
---|---|
Single |
Properties
DefaultDistance
Initial placement distance. Should be between min and max.
Declaration
public float DefaultDistance { get; set; }
Property Value
Type | Description |
---|---|
Single |
FaceTrackedObjectWhileClamped
The object will face the tracked object while the object is outside of the distance/direction bounds defined in this component.
Declaration
public bool FaceTrackedObjectWhileClamped { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
FaceUserDefinedTargetTransform
Face a user defined transform rather than using the solver orientation type.
Declaration
public bool FaceUserDefinedTargetTransform { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IgnoreAngleClamp
Option to ignore angle clamping.
Declaration
public bool IgnoreAngleClamp { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IgnoreDistanceClamp
Option to ignore distance clamping.
Declaration
public bool IgnoreDistanceClamp { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
IgnoreReferencePitchAndRoll
Option to ignore the pitch and roll of the reference target
Declaration
public bool IgnoreReferencePitchAndRoll { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
MaxDistance
Max distance from eye to element.
Declaration
public float MaxDistance { get; set; }
Property Value
Type | Description |
---|---|
Single |
MaxViewHorizontalDegrees
The horizontal angle from the tracked target forward axis to this object will not exceed this value.
Declaration
public float MaxViewHorizontalDegrees { get; set; }
Property Value
Type | Description |
---|---|
Single |
MaxViewVerticalDegrees
The vertical angle from the tracked target forward axis to this object will not exceed this value.
Declaration
public float MaxViewVerticalDegrees { get; set; }
Property Value
Type | Description |
---|---|
Single |
MinDistance
Min distance from eye to position element around, i.e. the sphere radius.
Declaration
public float MinDistance { get; set; }
Property Value
Type | Description |
---|---|
Single |
MoveToDefaultDistanceLerpTime
Position lerp multiplier.
Declaration
public float MoveToDefaultDistanceLerpTime { get; set; }
Property Value
Type | Description |
---|---|
Single |
OrientationType
The desired orientation of this object.
Declaration
public SolverOrientationType OrientationType { get; set; }
Property Value
Type | Description |
---|---|
SolverOrientationType |
OrientToControllerDeadzoneDegrees
The element will not reorient until the angle between the forward vector and vector to the controller is greater then this value.
Declaration
public float OrientToControllerDeadzoneDegrees { get; set; }
Property Value
Type | Description |
---|---|
Single |
PitchOffset
Pitch offset from reference element (relative to MaxDistance).
Declaration
public float PitchOffset { get; set; }
Property Value
Type | Description |
---|---|
Single |
PivotAxis
Rotation axes used when facing target.
Declaration
public AxisFlags PivotAxis { get; set; }
Property Value
Type | Description |
---|---|
AxisFlags |
ReorientWhenOutsideParameters
The element will only reorient when the object is outside of the distance/direction bounds above.
Declaration
public bool ReorientWhenOutsideParameters { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
TargetToFace
Transform this object should face rather than using the solver orientation type.
Declaration
public Transform TargetToFace { get; set; }
Property Value
Type | Description |
---|---|
Transform |
TetherAngleSteps
The division of steps this object can tether to. Higher the number, the more snapping steps.
Declaration
public int TetherAngleSteps { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
UseAngleStepping
Lock the rotation to a specified number of steps around the tracked object.
Declaration
public bool UseAngleStepping { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
VerticalMaxDistance
Max vertical distance between element and reference.
Declaration
public float VerticalMaxDistance { get; set; }
Property Value
Type | Description |
---|---|
Single |
Methods
OnEnable()
Declaration
protected override void OnEnable()
Recenter()
Declaration
public void Recenter()
SolverUpdate()
Declaration
public override void SolverUpdate()