Class XRMovableBody
Container for an XROrigin that can be transformed using the user's body as a frame of reference.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit.Locomotion
Assembly: solution.dll
Syntax
public class XRMovableBody
Constructors
| Name | Description |
|---|---|
| XRMovableBody(XROrigin, IXRBodyPositionEvaluator) | Initializes a new instance of a movable body. |
Properties
| Name | Description |
|---|---|
| bodyPositionEvaluator | The object that determines the position of the user's body. |
| constrainedManipulator | Object that can be used to perform movement that is constrained by collision (optional, may be null). |
| originTransform | The Transform component of the Origin of the xrOrigin. This is the Transform component that is manipulated to move the body. |
| xrOrigin | The XR Origin whose Origin is transformed to move the body. |
Methods
| Name | Description |
|---|---|
| GetBodyGroundLocalPosition() | Gets the position of where the user's body is grounded (e.g. their feet), in the local space of the originTransform, based on the bodyPositionEvaluator. |
| GetBodyGroundWorldPosition() | Gets the world position of where the user's body is grounded (e.g. their feet), based on the bodyPositionEvaluator. |
| LinkConstrainedManipulator(IConstrainedXRBodyManipulator) | Links the given constrained manipulator to this body. This sets constrainedManipulator to
|
| UnlinkConstrainedManipulator() | Unlinks the assigned constrained manipulator from this body, if there is one. This calls OnUnlinkedFromBody() on the manipulator and sets constrainedManipulator to null. |