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
AngularClampMode
Accessors for specifying the method used to ensure the refForward vector remains within the bounds set by the leashing parameters.
Declaration
public Follow.AngularClampType AngularClampMode { get; set; }
Property Value
Type | Description |
---|---|
Follow.AngularClampType |
BoundsScaler
Scales the bounds to impose a larger or smaller bounds than the calculated bounds.
Declaration
public float BoundsScaler { get; set; }
Property Value
Type | Description |
---|---|
Single |
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 |
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 |
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()
RecalculateBoundsExtents()
Recalculates the bounds based on the angular clamp mode.
Declaration
public void RecalculateBoundsExtents()
Recenter()
Re-centers the target in the next update.
Declaration
public void Recenter()
SolverUpdate()
Declaration
public override void SolverUpdate()