Class DelegateXRBodyTransformation
Body transformation that invokes a delegate when applied.
Implements
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Locomotion
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public class DelegateXRBodyTransformation : IXRBodyTransformation
Constructors
DelegateXRBodyTransformation()
Constructs a new transformation.
Declaration
public DelegateXRBodyTransformation()
DelegateXRBodyTransformation(Action<XRMovableBody>)
Constructs a new transformation with the specified delegate.
Declaration
public DelegateXRBodyTransformation(Action<XRMovableBody> transformation)
Parameters
Type | Name | Description |
---|---|---|
Action<XRMovableBody> | transformation | The delegate to be invoked when Apply(XRMovableBody) is called. |
Methods
Apply(XRMovableBody)
Performs the transformation on the given body.
Declaration
public void Apply(XRMovableBody body)
Parameters
Type | Name | Description |
---|---|---|
XRMovableBody | body | The body whose originTransform to transform. |
Events
transformation
Invoked when Apply(XRMovableBody) is called. Use this to perform the actual transformation.
Declaration
public event Action<XRMovableBody> transformation
Event Type
Type | Description |
---|---|
Action<XRMovableBody> |