Language
Edit

FaceUserConstraint Class

Definition

Component for fixing the rotation of a manipulated object such that it always faces or faces away from the user.

[UnityEngine.AddComponentMenu("MRTK/Spatial Manipulation/Face User Constraint")]
public class FaceUserConstraint : MixedReality.Toolkit.SpatialManipulation.TransformConstraint
[<UnityEngine.AddComponentMenu("MRTK/Spatial Manipulation/Face User Constraint")>]
type FaceUserConstraint = class
    inherit TransformConstraint
Public Class FaceUserConstraint
Inherits TransformConstraint
Inheritance
UnityEngine.MonoBehaviour
FaceUserConstraint
Attributes
UnityEngine.AddComponentMenuAttribute

Remarks

The constraint system might be reworked in the future. In such a case, these existing components will be deprecated.

Constructors

Name Description
FaceUserConstraint()

Fields

Name Description
InitialWorldPose

The initial world pose before any manipulations.

(Inherited from TransformConstraint)
WorldPoseOnManipulationStart

The world pose of the object when the manipulation began.

(Inherited from TransformConstraint)

Properties

Name Description
ConstraintType

Get flags that describe the type of transformations this constraint applies to.

ExecutionPriority

Execution order priority of this constraint. Lower numbers will be executed before higher numbers.

(Inherited from TransformConstraint)
FaceAway

If true, this will constrain rotation to face away from the user

GravityAlign

If true, this will gravity align the rotation

HandType

Whether this constraint applies to one hand manipulation, two hand manipulation or both

(Inherited from TransformConstraint)
ProximityType

Whether this constraint applies to near manipulation, far manipulation or both

(Inherited from TransformConstraint)

Methods

Name Description
ApplyConstraint(MixedRealityTransform)

Updates an rotation so that its facing the camera

OnDisable()

A Unity event function that is called when the script component has been disabled.

(Inherited from TransformConstraint)
OnEnable()

A Unity event function that is called when the script component has been enabled.

(Inherited from TransformConstraint)
OnManipulationStarted(MixedRealityTransform)

Called when manipulation starts on the attached object.

(Inherited from TransformConstraint)
Setup(MixedRealityTransform)

Called once before any constraints are computed.

(Inherited from TransformConstraint)

Applies to