docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Interface IConstrainedXRBodyManipulator

    Interface for an object that can perform movement of an XRMovableBody that is constrained by collision based on where the user's body is.

    Namespace: UnityEngine.XR.Interaction.Toolkit.Locomotion
    Assembly: solution.dll
    Syntax
    public interface IConstrainedXRBodyManipulator

    Properties

    Name Description
    isGrounded

    Whether the linkedBody is touching the ground, as of the most recent call to MoveBody(Vector3).

    lastCollisionFlags

    Flags indicating the direction of the collision from the most recent call to MoveBody(Vector3).

    linkedBody

    The body whose originTransform to move.

    Methods

    Name Description
    MoveBody(Vector3)

    Applies the given motion to linkedBody. A collision can constrain the movement from taking place.

    OnLinkedToBody(XRMovableBody)

    Called after the given body links this manipulator to it. The implementation should ensure that linkedBody points to body after this method is called.

    OnUnlinkedFromBody()

    Called when a body unlinks this manipulator from it. The implementation should ensure that linkedBody returns null after this method is called.

    See Also

    CharacterControllerBodyManipulator
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)