This site has been permanently archived. The content on this site was last updated in 2019.
Stay organized with collections
Save and categorize content based on your preferences.
Used to override the global scroll settings in GvrPointerScrollInput
for the GameObject
that this script is attached to.
Summary
Inheritance
Inherits from: MonoBehaviour,
IGvrScrollSettingsPublic attributes
Properties
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["\u003cp\u003e\u003ccode\u003eGvrScrollSettings\u003c/code\u003e allows you to customize the scroll behavior of a specific GameObject, overriding the global settings defined in \u003ccode\u003eGvrPointerScrollInput\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt provides control over the deceleration rate of scrolling and whether inertia (continued scrolling after touch release) is enabled.\u003c/p\u003e\n"],["\u003cp\u003eYou can adjust the \u003ccode\u003edecelerationRateOverride\u003c/code\u003e to fine-tune how quickly scrolling slows down after the user stops interacting.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003einertiaOverride\u003c/code\u003e property lets you enable or disable inertia for a more responsive or controlled scrolling experience.\u003c/p\u003e\n"]]],["`GvrScrollSettings` overrides global scroll settings for a specific `GameObject`. It allows control over scroll behavior using `decelerationRateOverride`, a float representing the speed reduction per second, defaulting to 0.05. The `inertiaOverride`, a boolean, determines if the object will continue scrolling after user input stops. These properties can override the `GvrPointerScrollInput` settings. `DecelerationRateOverride` and `InertiaOverride` provide get functions to retrieve the overridden values.\n"],null,["# GvrScrollSettings Class Reference\n\nGvrScrollSettings\n=================\n\nUsed to override the global scroll settings in [GvrPointerScrollInput](/vr/reference/unity/class/GvrPointerScrollInput#classGvrPointerScrollInput) for the `GameObject` that this script is attached to.\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: MonoBehaviour, [IGvrScrollSettings](/vr/reference/unity/interface/IGvrScrollSettings)\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [decelerationRateOverride](#classGvrScrollSettings_1ad61d799f3999c9773eb6c8629e6b4f94)` = 0.05f` | `float` The deceleration rate is the speed reduction per second. |\n| [inertiaOverride](#classGvrScrollSettings_1a74c227354067e72ac7d1735d872722c3)` = true` | `bool` Override the `Inertia` property in [GvrPointerScrollInput](/vr/reference/unity/class/GvrPointerScrollInput#classGvrPointerScrollInput) for this object. |\n\n| ### Properties ||\n|----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|\n| [DecelerationRateOverride](#classGvrScrollSettings_1ac3ad56472483574c90ecebc6a57013b9) | `float` Gets the deceleration rate override value. |\n| [InertiaOverride](#classGvrScrollSettings_1aa9b11ab9317f8980dce99d7157f5e5b2) | `bool` Gets a value indicating whether the overridden value for `interia` is enabled. |\n\nPublic attributes\n-----------------\n\n### decelerationRateOverride\n\n```c#\nfloat decelerationRateOverride = 0.05f\n``` \nThe deceleration rate is the speed reduction per second.\n\nA value of 0.5 halves the speed each second. The default is 0.05. The deceleration rate is only used when `inertia` is `true`. \n\n### inertiaOverride\n\n```c#\nbool inertiaOverride = true\n``` \nOverride the `Inertia` property in [GvrPointerScrollInput](/vr/reference/unity/class/GvrPointerScrollInput#classGvrPointerScrollInput) for this object.\n\nInertia means that scroll events will continue for a while after the user stops touching the touchpad. It gradually slows down according to the `decelerationRate`.\n\nProperties\n----------\n\n### DecelerationRateOverride\n\n```c#\nfloat DecelerationRateOverride\n``` \nGets the deceleration rate override value.\n\nThis value will override the deceleration rate in [GvrPointerScrollInput](/vr/reference/unity/class/GvrPointerScrollInput#classGvrPointerScrollInput) for this object.\n\nThe deceleration rate is the speed reduction per second.\n\nA value of 0.5 halves the speed each second.\n\nThe deceleration rate is only used when `inertia` is `true`.\n\nGets the deceleration rate override value for the [GvrPointerScrollInput](/vr/reference/unity/class/GvrPointerScrollInput#classGvrPointerScrollInput). \n\n### InertiaOverride\n\n```c#\nbool InertiaOverride\n``` \nGets a value indicating whether the overridden value for `interia` is enabled.\n\nThis value will override the Inertia property in [GvrPointerScrollInput](/vr/reference/unity/class/GvrPointerScrollInput#classGvrPointerScrollInput) for this object.\n\nInertia means that scroll events will continue for a while after the user stops touching the touchpad. It gradually slows down according to the `decelerationRate`.\n\nGets the overridden value for whether to use `interia` for the [GvrPointerScrollInput](/vr/reference/unity/class/GvrPointerScrollInput#classGvrPointerScrollInput)."]]