GvrPointerScrollInput

This class is used by GvrPointerInputModule to route scroll events through Unity's Event System.

Summary

It maintains indepedent velocities for each instance of IScrollHandler that is currently being scrolled. Inertia can optionally be toggled off.

Public attributes

PROPERTY_NAME_DECELERATION_RATE = "decelerationRate"
const string
PROPERTY_NAME_INERTIA = "inertia"
const string
SCROLL_DELTA_MULTIPLIER = 1000.0f
const float
Multiplier for calculating the scroll delta so that the scroll delta is within the order of magnitude that the UI system expects.
decelerationRate = 0.05f
float
The deceleration rate is the speed reduction per second.
inertia = true
bool
Inertia means that scroll events will continue for a while after the user stops touching the touchpad.

Public functions

HandleScroll(GameObject currentGameObject, PointerEventData pointerData, GvrBasePointer pointer, IGvrEventExecutor eventExecutor)
void

Public attributes

PROPERTY_NAME_DECELERATION_RATE

const string PROPERTY_NAME_DECELERATION_RATE = "decelerationRate"

PROPERTY_NAME_INERTIA

const string PROPERTY_NAME_INERTIA = "inertia"

SCROLL_DELTA_MULTIPLIER

const float SCROLL_DELTA_MULTIPLIER = 1000.0f

Multiplier for calculating the scroll delta so that the scroll delta is within the order of magnitude that the UI system expects.

decelerationRate

float decelerationRate = 0.05f

The deceleration rate is the speed reduction per second.

A value of 0.5 halves the speed each second. The default is 0.05. The deceleration rate is only used when inertia is enabled.

inertia

bool inertia = true

Inertia means that scroll events will continue for a while after the user stops touching the touchpad.

It gradually slows down according to the decelerationRate.

Public functions

HandleScroll

void HandleScroll(
  GameObject currentGameObject,
  PointerEventData pointerData,
  GvrBasePointer pointer,
  IGvrEventExecutor eventExecutor
)