Class CharacterControllerBodyManipulator
Scriptable object that can perform constrained movement of an XRMovable
Inheritance
Implements
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.Locomotion
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[CreateAssetMenu(fileName = "CharacterControllerBodyManipulator", menuName = "XR/Locomotion/Character Controller Body Manipulator")]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.1/api/UnityEngine.XR.Interaction.Toolkit.Locomotion.CharacterControllerBodyManipulator.html")]
public class CharacterControllerBodyManipulator : ScriptableConstrainedBodyManipulator, IConstrainedXRBodyManipulator
Properties
characterController
The character controller attached to the origin
Declaration
public CharacterController characterController { get; }
Property Value
Type | Description |
---|---|
Character |
isGrounded
Whether the linked
Declaration
public override bool isGrounded { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
lastCollisionFlags
Flags indicating the direction of the collision from the most recent call to Move
Declaration
public override CollisionFlags lastCollisionFlags { get; }
Property Value
Type | Description |
---|---|
Collision |
Overrides
Methods
MoveBody(Vector3)
Applies the given motion to linked
Declaration
public override CollisionFlags MoveBody(Vector3 motion)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | motion | Amount of translation to apply. |
Returns
Type | Description |
---|---|
Collision |
Returns flags that indicate the direction of the collision, if there was one. |
Overrides
OnLinkedToBody(XRMovableBody)
Called after the given body links this manipulator to it. The implementation should ensure that
linkedbody
after this method is called.
Declaration
public override void OnLinkedToBody(XRMovableBody body)
Parameters
Type | Name | Description |
---|---|---|
XRMovable |
body | The body linked with this manipulator. |
Overrides
See Also
OnUnlinkedFromBody()
Called when a body unlinks this manipulator from it. The implementation should ensure that
linked
Declaration
public override void OnUnlinkedFromBody()