Provides common teleportation/movement functionality to a controller More...
Public Types | |
enum | TeleportModes { TeleportModes.INSTANT, TeleportModes.FADE_COLOR, TeleportModes.DASH, TeleportModes.FADE_DASH } |
Modes of teleportation/movement. INSTANT: Instantly moves to the target position FADE_COLOR: Fades the screen to a given color, teleports to target location, then fades the color back out. DASH: Moves to target location in a linear fash with a given speed. FADE_DASH: Combination of FADE_COLOR and DASH. Fades the camera to a given color, then (while the curtains are closed) linearly translates the rig to target location. Then fades the colro back out. FADE_DASH or DASH are the modes of choice when using an avatar, as they provide a speed value. More... | |
Public Attributes | |
AVR_ControllerInputManager.BoolEvent | Enable_event |
Event which enables/shows the teleportation-ray. More... | |
AVR_ControllerInputManager.BoolEvent | Execute_event |
Event which (if possible) executes the movement to target location. Can only ocurr if the ray is visible, eg if enable_event is also true. More... | |
TeleportModes | teleportMode |
Modes of teleportation/movement. INSTANT: Instantly moves to the target position FADE_COLOR: Fades the screen to a given color, teleports to target location, then fades the color back out. DASH: Moves to target location in a linear fash with a given speed. FADE_DASH: Combination of FADE_COLOR and DASH. Fades the camera to a given color, then (while the curtains are closed) linearly translates the rig to target location. Then fades the colro back out. FADE_DASH or DASH are the modes of choice when using an avatar, as they provide a speed value. More... | |
AVR_MovementRestrictor | movementRestrictor |
Determines which surface is a valid teleport-location and which is not. More... | |
AVR_MovementRay | ray |
Ray which is displayed to target a location. More... | |
AVR_Effect | CameraFadeEffect |
CameraFadeEffect used when teleportmode is FADE_COLOR or FADE_DASH. More... | |
float | fade_pause = 0.1f |
When using FADE_COLOR or FADE_DASH, this determines the amount of time between fade-in and fade-out transitions. More... | |
float | dash_speed = 30.0f |
When using DASH or FADE_DASH, this determines the speed (in units/s) we travel towards the target location. When using DASH its recommended to keep this reasonably high to avoid motion sickness. 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 | Start () |
Protected Member Functions inherited from AVR.Core.AVR_ControllerComponent | |
override void | Awake () |
Protected Member Functions inherited from AVR.Core.AVR_Component | |
virtual void | OnEnable () |
virtual void | OnDisable () |
Private Member Functions | |
void | Update () |
IEnumerator | BlinkTeleport () |
This coroutine is exectued when a blink-movement (INSTANT) is performed. More... | |
IEnumerator | FadeDash () |
This coroutine is exectued when a fade-dash-movement is performed. More... | |
void | CommenceTeleport (Vector3 targetLocation) |
Begins a movement towards target location More... | |
void | MoveRigToFeetLocation (Vector3 feet) |
Private Attributes | |
bool | tp_in_progress = false |
Vector3 | destination |
Vector3 | dash_origin |
float | dash_stime |
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 common teleportation/movement functionality to a controller
Definition at line 15 of file AVR_MovementProvider.cs.