Class SetPoseAction
Sets the position of this GameObject to the position of the found real-world object.
Inherited Members
Namespace: Unity.MARS.Actions
Syntax
[HelpURL("https://docs.unity3d.com/Packages/com.unity.mars@1.5/manual/ReferenceGuideActions.html#set-pose-action-setposeaction")]
[RequireComponent(typeof(Proxy))]
[ComponentTooltip("Sets the position of this GameObject to the position of the found real-world object.")]
[MonoBehaviourComponentMenu(typeof(SetPoseAction), "Action/Set Pose")]
[MovedFrom("Unity.MARS")]
public class SetPoseAction : TransformAction, IMatchLossHandler, IMatchAcquireHandler, IMatchUpdateHandler, IAction, ISimulatable, IRequiresTraits
Fields
AlignWithWorldUp
The axis that will be aligned to the world up direction. If set to None (default), the data's pose rotation will be used directly. If set to Y, the local Y axis will always be aligned with the world Up direction. If set to Z, the local Z axis will always be aligned with the world Up direction.
Declaration
[SerializeField]
[Tooltip("The axis that will be aligned to the world up direction. If set to None (default), the data's pose rotation will be used directly.If set to Y, the local Y axis will always be aligned with the world Up direction.If set to Z, the local Z axis will always be aligned with the world Up direction.")]
public SetPoseAction.AlignMode AlignWithWorldUp
Field Value
Type | Description |
---|---|
SetPoseAction.AlignMode |
FollowMatchUpdates
When enabled movement of the matched data, such as surface resizing, will be followed
Declaration
[SerializeField]
[Tooltip("When enabled movement of the matched data, such as surface-resizing, will be followed")]
public bool FollowMatchUpdates
Field Value
Type | Description |
---|---|
Boolean |
Methods
GetRequiredTraits()
Get the TraitRequirements that are required by this object
Declaration
public TraitRequirement[] GetRequiredTraits()
Returns
Type | Description |
---|---|
TraitRequirement[] | The required traits |
Implements
OnMatchAcquire(QueryResult)
Called when a query match has been found
Declaration
public void OnMatchAcquire(QueryResult queryResult)
Parameters
Type | Name | Description |
---|---|---|
QueryResult | queryResult | Data associated with this event |
Implements
OnMatchUpdate(QueryResult)
Called when a query match's data has updated
Declaration
public void OnMatchUpdate(QueryResult queryResult)
Parameters
Type | Name | Description |
---|---|---|
QueryResult | queryResult | Data associated with this event |