docs.unity.cn
    Show / Hide Table of Contents

    Class CharacterControllerDriver

    Drives a height upon locomotion events of a LocomotionProvider.

    Inheritance
    Object
    CharacterControllerDriver
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    public class CharacterControllerDriver : MonoBehaviour

    Properties

    characterController

    (Read Only) The that this class drives.

    Declaration
    protected CharacterController characterController { get; }
    Property Value
    Type Description
    CharacterController

    locomotionProvider

    The LocomotionProvider object to listen to.

    Declaration
    public LocomotionProvider locomotionProvider { get; set; }
    Property Value
    Type Description
    LocomotionProvider

    maxHeight

    The maximum height of the character's capsule that will be set by this behavior.

    Declaration
    public float maxHeight { get; set; }
    Property Value
    Type Description
    Single
    See Also
    minHeight

    minHeight

    The minimum height of the character's capsule that will be set by this behavior.

    Declaration
    public float minHeight { get; set; }
    Property Value
    Type Description
    Single
    See Also
    maxHeight

    xrRig

    (Read Only) The XRRig used for driving the .

    Declaration
    protected XRRig xrRig { get; }
    Property Value
    Type Description
    XRRig

    Methods

    Awake()

    See .

    Declaration
    protected void Awake()

    OnDisable()

    See .

    Declaration
    protected void OnDisable()

    OnEnable()

    See .

    Declaration
    protected void OnEnable()

    Start()

    See .

    Declaration
    protected void Start()

    UpdateCharacterController()

    Update the and based on the camera's position.

    Declaration
    protected virtual void UpdateCharacterController()
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Wednesday, October 27, 2021