Class CharacterControllerDriver
Controls a CharacterController height upon locomotion events of a LocomotionProvider.
Inherited Members
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.0/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 |
xrRig
(Read Only) The XRRig used for driving the CharacterController.
Declaration
[Obsolete("xrRig has been deprecated. Use xrOrigin instead.")]
protected XRRig xrRig { get; }
Property Value
Type | Description |
---|---|
XRRig |
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()