Provides locomotion-movement to a controller. More...
Public Types | |
enum | DirectionType { DirectionType.RELATIVE_TO_CONTROLLER, DirectionType.RELATIVE_TO_HEADSET, DirectionType.RELATIVE_TO_RIG, DirectionType.ABSOLUTE } |
What should determine the direction of movement? Example: "RELATIVE_TO_CONTROLLER" will move the Rig in the direction the controller is facing. More... | |
enum | DirectionAxes { DirectionAxes.XY, DirectionAxes.XZ, DirectionAxes.YX, DirectionAxes.YZ, DirectionAxes.ZX, DirectionAxes.ZY } |
The input is given by a 2d vector from the controller (moveDirection), this value determines how this 2d vector maps into 3d movement. It gives the directions (with local space given by DirectionType) that represent the x and y inputs. Example: "XZ" mean input.x maps to movement along the x-axis and input.y maps to movement along the z-axis More... | |
Public Attributes | |
AVR_ControllerInputManager.BoolEvent | moveEvent |
Movement is only performed when this event is true. More... | |
AVR_ControllerInputManager.Vec2Event | moveDirection |
The event we retrieve our movement vector from. More... | |
DirectionType | dirType = DirectionType.RELATIVE_TO_CONTROLLER |
What should determine the direction of movement? Example: "RELATIVE_TO_CONTROLLER" will move the Rig in the direction the controller is facing. More... | |
DirectionAxes | dirAxes = DirectionAxes.XZ |
The input is given by a 2d vector from the controller (moveDirection), this value determines how this 2d vector maps into 3d movement. It gives the directions (with local space given by DirectionType) that represent the x and y inputs. Example: "XZ" mean input.x maps to movement along the x-axis and input.y maps to movement along the z-axis More... | |
float | speed = 2.0f |
Determines the base movement speed of the charactercontroller. More... | |
bool | use_gravity = true |
Determines whether if gravity is applied to the charactercontroller. More... | |
bool | disable_y_axis = false |
Disables movement along the world-space y-axis. This exludes gravity, which will still be applied if use_gravity is set. More... | |
bool | use_acceleration = false |
If set to false, speed will be set instantly. If set to true, movement will accelerate over time. More... | |
float | acceleration_constant = 0.1f |
Determines the amount acceleration. 0 means no movement ever, 1 means instant acceleration. More... | |
Public Attributes inherited from AVR.Core.AVR_Component | |
UnityEngine.Events.UnityEvent | onAwake |
Events called when this component awakes. More... | |
UnityEngine.Events.UnityEvent | onStart |
Events called when this component starts. More... | |
UnityEngine.Events.UnityEvent | onEnable |
Events called when this component is enabled. More... | |
UnityEngine.Events.UnityEvent | onDisable |
Events called when this component is disabled. More... | |
Protected Member Functions | |
override void | Awake () |
Protected Member Functions inherited from AVR.Core.AVR_Component | |
virtual void | Start () |
virtual void | OnEnable () |
virtual void | OnDisable () |
Private Member Functions | |
void | LateUpdate () |
Private Attributes | |
System.Func< Vector2, Vector3 > | tF |
CharacterController | ch => playerRig.characterController |
Vector3 | movement = Vector3.zero |
Additional Inherited Members | |
Public Member Functions inherited from AVR.Core.AVR_Behaviour | |
virtual void | OnDestroy () |
Protected Attributes inherited from AVR.Core.AVR_Behaviour | |
AVR_PlayerRig | playerRig => AVR_PlayerRig.Instance |
The current AVR_PlayerRig instance in the scene More... | |
AVR_Root | root => AVR_Root.Instance |
The current AVR_Root instance in the scene More... | |
bool | vrEnabled => UnityEngine.XR.XRSettings.enabled |
True if the application is running as a VR/XR application More... | |
Properties inherited from AVR.Core.AVR_ControllerComponent | |
AVR_Controller | controller [get, set] |
Provides locomotion-movement to a controller.
Definition at line 12 of file AVR_LocomotionProvider.cs.