TeleportInputHandlerTouch Class Reference

When this component is enabled, the player will be able to aim and trigger teleport behavior using Oculus Touch controllers. More...

Inheritance diagram for TeleportInputHandlerTouch:
TeleportInputHandlerHMD TeleportInputHandler TeleportSupport

Public Types

enum  InputModes { InputModes.CapacitiveButtonForAimAndTeleport, InputModes.SeparateButtonsForAimAndTeleport, InputModes.ThumbstickTeleport, InputModes.ThumbstickTeleportForwardBackOnly }
 The touch input handler supports three different modes for controlling teleports. More...
 
enum  AimCapTouchButtons {
  AimCapTouchButtons.A, AimCapTouchButtons.B, AimCapTouchButtons.LeftTrigger, AimCapTouchButtons.LeftThumbstick,
  AimCapTouchButtons.RightTrigger, AimCapTouchButtons.RightThumbstick, AimCapTouchButtons.X, AimCapTouchButtons.Y
}
 These buttons are used for selecting which capacitive button is used when InputMode==CapacitiveButtonForAimAndTeleport More...
 

Public Member Functions

override LocomotionTeleport.TeleportIntentions GetIntention ()
 Based on the input mode, controller state, and current intention of the teleport controller, return the apparent intention of the user. More...
 
override void GetAimData (out Ray aimRay)
 Returns the aim ray for pointing at targets, which is generally based on a touch controller or HMD pose. More...
 

Public Attributes

Transform LeftHand
 
Transform RightHand
 
InputModes InputMode
 
OVRInput.Controller AimingController
 Which controller is being used for aiming. More...
 
AimCapTouchButtons CapacitiveAimAndTeleportButton
 The button to use for triggering aim and teleport when InputMode==CapacitiveButtonForAimAndTeleport More...
 
float ThumbstickTeleportThreshold = 0.5f
 The thumbstick magnitude required to trigger aiming and teleports when InputMode==InputModes.ThumbstickTeleport More...
 
- Public Attributes inherited from TeleportInputHandlerHMD
OVRInput.RawButton AimButton
 The button used to begin aiming for a teleport. More...
 
OVRInput.RawButton TeleportButton
 The button used to trigger the teleport after aiming. It can be the same button as the AimButton, however you cannot abort a teleport if it is. More...
 
bool FastTeleport
 When true, the system will not use the PreTeleport intention which will allow a teleport to occur on a button downpress. When false, the button downpress will trigger the PreTeleport intention and the Teleport intention when the button is released. More...
 

Additional Inherited Members

- Protected Member Functions inherited from TeleportInputHandler
 TeleportInputHandler ()
 
override void AddEventHandlers ()
 Derived classes that need to use event handlers need to override this method and call the base class to ensure all event handlers are added as intended. More...
 
override void RemoveEventHandlers ()
 Derived classes that need to use event handlers need to override this method and call the base class to ensure all event handlers are removed as intended. More...
 
- Protected Member Functions inherited from TeleportSupport
virtual void OnEnable ()
 OnEnable is virtual so that derived classes can set up references to objects before AddEventHandlers is called, as is required by TeleportSupport derivations. More...
 
virtual void OnDisable ()
 
- Properties inherited from TeleportInputHandlerHMD
Transform Pointer [get]
 
- Properties inherited from TeleportSupport
LocomotionTeleport LocomotionTeleport [get]
 

Detailed Description

When this component is enabled, the player will be able to aim and trigger teleport behavior using Oculus Touch controllers.

Member Enumeration Documentation

◆ AimCapTouchButtons

These buttons are used for selecting which capacitive button is used when InputMode==CapacitiveButtonForAimAndTeleport

Enumerator
LeftTrigger 
LeftThumbstick 
RightTrigger 
RightThumbstick 

◆ InputModes

The touch input handler supports three different modes for controlling teleports.

Enumerator
CapacitiveButtonForAimAndTeleport 

Touching a capacitive button will start the aiming, and pressing that button will trigger the teleport.

SeparateButtonsForAimAndTeleport 

One button will start the aiming, another button will trigger the teleport.

ThumbstickTeleport 

A thumbstick in any direction is used for starting the aiming, and releasing the thumbstick will trigger the teleport.

ThumbstickTeleportForwardBackOnly 

A thumbstick forward or back is used for starting the aiming, and releasing the thumbstick will trigger the teleport.

Member Function Documentation

◆ GetAimData()

override void TeleportInputHandlerTouch.GetAimData ( out Ray  aimRay)
virtual

Returns the aim ray for pointing at targets, which is generally based on a touch controller or HMD pose.

Reimplemented from TeleportInputHandlerHMD.

◆ GetIntention()

override LocomotionTeleport.TeleportIntentions TeleportInputHandlerTouch.GetIntention ( )
virtual

Based on the input mode, controller state, and current intention of the teleport controller, return the apparent intention of the user.

Returns

Reimplemented from TeleportInputHandlerHMD.

Member Data Documentation

◆ AimingController

OVRInput.Controller TeleportInputHandlerTouch.AimingController

Which controller is being used for aiming.

◆ CapacitiveAimAndTeleportButton

AimCapTouchButtons TeleportInputHandlerTouch.CapacitiveAimAndTeleportButton

The button to use for triggering aim and teleport when InputMode==CapacitiveButtonForAimAndTeleport

◆ InputMode

InputModes TeleportInputHandlerTouch.InputMode

◆ LeftHand

Transform TeleportInputHandlerTouch.LeftHand

◆ RightHand

Transform TeleportInputHandlerTouch.RightHand

◆ ThumbstickTeleportThreshold

float TeleportInputHandlerTouch.ThumbstickTeleportThreshold = 0.5f

The thumbstick magnitude required to trigger aiming and teleports when InputMode==InputModes.ThumbstickTeleport


The documentation for this class was generated from the following file: