docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Class CharacterControllerBodyManipulator

    Scriptable object that can perform constrained movement of an XRMovableBody by using a CharacterController that follows the user's body. Each time this object is about to call Move on the characterController, it first ensures that the center and height are set such that the bottom of the capsule matches the position determined by GetBodyGroundLocalPosition() and the height of the capsule matches CameraInOriginSpaceHeight.

    Inheritance
    object
    Object
    ScriptableObject
    ScriptableConstrainedBodyManipulator
    CharacterControllerBodyManipulator
    Implements
    IConstrainedXRBodyManipulator
    Inherited Members
    ScriptableConstrainedBodyManipulator.linkedBody
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    Namespace: UnityEngine.XR.Interaction.Toolkit.Locomotion
    Assembly: solution.dll
    Syntax
    [CreateAssetMenu(fileName = "CharacterControllerBodyManipulator", menuName = "XR/Locomotion/Character Controller Body Manipulator")]
    [HelpURL("https://docs.unity.cn/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Locomotion.CharacterControllerBodyManipulator.html")]
    public class CharacterControllerBodyManipulator : ScriptableConstrainedBodyManipulator, IConstrainedXRBodyManipulator

    Properties

    Name Description
    characterController

    The character controller attached to the originTransform of the linkedBody. This is null if linkedBody is null.

    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).

    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.

    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)