Editar

Partilhar via


SolverHandler Class

Definition

This class handles the solver components that are attached to this GameObject

public ref class SolverHandler : UnityEngine::MonoBehaviour
[UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/SolverHandler")]
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/solvers/solver")]
public class SolverHandler : UnityEngine.MonoBehaviour
[<UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/SolverHandler")>]
[<UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/solvers/solver")>]
type SolverHandler = class
    inherit MonoBehaviour
Public Class SolverHandler
Inherits MonoBehaviour
Inheritance
UnityEngine.MonoBehaviour
SolverHandler
Attributes
UnityEngine.AddComponentMenuAttribute UnityEngine.HelpURLAttribute

Constructors

SolverHandler()

Fields

currentTrackedHandedness
preferredTrackedHandedness
solvers

Properties

AdditionalOffset

Add an additional offset of the tracked object to base the solver on. Useful for tracking something like a halo position above your head or off the side of a controller.

AdditionalRotation

Add an additional rotation on top of the tracked object. Useful for tracking what is essentially the up or right/left vectors.

AltScale

Alternate scale.

CurrentTrackedHandedness

Currently tracked hand or motion controller if applicable

DeltaTime

The timestamp the solvers will use to calculate with.

GoalPosition

The position the solver is trying to move to.

GoalRotation

The rotation the solver is trying to rotate to.

GoalScale

The scale the solver is trying to scale to.

PreferredTrackedHandedness

Controller side to favor and pick first if TrackedHandedness is set to both

Solvers

List of solvers that this handler will manage and update

TrackedHandedness

If tracking hands or motion controllers, determines which hand(s) are valid attachments.

TrackedHandJoint

When TrackedTargetType is set to hands, use this specific joint to calculate position and orientation

TrackedHandness
Obsolete.

If tracking hands or motion controllers, determines which hand(s) are valid attachments.

TrackedObjectToReference
Obsolete.

Tracked object to calculate position and orientation from. If you want to manually override and use a scene object, use the TransformTarget field.

TrackedTargetType

Tracked object to calculate position and orientation from. If you want to manually override and use a scene object, use the TransformTarget field.

TransformOverride

Manual override for when TrackedTargetType is set to CustomOverride

TransformTarget

The target transform that the solvers will act upon.

UpdateSolvers

Whether or not this SolverHandler calls SolverUpdate() every frame. Only one SolverHandler should manage SolverUpdate(). This setting does not affect whether the Target Transform of this SolverHandler gets updated or not.

Methods

AttachToNewTrackedObject()
DetachFromCurrentTrackedObject()
IsValidHandedness(Handedness)
IsValidTrackedObjectType(TrackedObjectType)
OnDestroy()
RefreshTrackedObject()

Clears the transform target and attaches to the current TrackedTargetType.

RegisterSolver(Solver)

Adds solver to the list of Solvers guaranteeing inspector ordering.

Start()
UnregisterSolver(Solver)

Removes solver from the list of Solvers.

Update()

Applies to