Class CharacterControllerDriver
Controls a CharacterController height upon locomotion events of a LocomotionProvider.
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit
Syntax
[AddComponentMenu("XR/Locomotion/Character Controller Driver", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.3/api/UnityEngine.XR.Interaction.Toolkit.CharacterControllerDriver.html")]
public class CharacterControllerDriver : MonoBehaviour
Properties
characterController
(Read Only) The CharacterController 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 this behavior sets.
Declaration
public float maxHeight { get; set; }
Property Value
Type | Description |
---|---|
Single |
See Also
minHeight
The minimum height of the character's capsule that this behavior sets.
Declaration
public float minHeight { get; set; }
Property Value
Type | Description |
---|---|
Single |
See Also
xrOrigin
(Read Only) The XROrigin used for driving the CharacterController.
Declaration
protected XROrigin xrOrigin { get; }
Property Value
Type | Description |
---|---|
XROrigin |
Methods
Awake()
See MonoBehaviour.
Declaration
protected void Awake()
OnDisable()
See MonoBehaviour.
Declaration
protected void OnDisable()
OnEnable()
See MonoBehaviour.
Declaration
protected void OnEnable()
Start()
See MonoBehaviour.
Declaration
protected void Start()
UpdateCharacterController()
Declaration
protected virtual void UpdateCharacterController()