The rate at which movement slows down.
The deceleration rate is the speed reduction per second. A value of 0.5 halves the speed each second. The default is 0.135. The deceleration rate is only used when inertia is enabled.
#pragma strict // Required when Using UI elements. public var myScrollRect; public function Start() { // The higher the number the longer it takes to decelerate. myScrollRect.decelerationRate = 5.0f; }
using UnityEngine; using System.Collections; using UnityEngine.UI; // Required when Using UI elements.
public class ExampleClass : MonoBehaviour { public ScrollRect myScrollRect; public void Start () { // assigns a new value to the decelerationRate of the scroll rect. // The higher the number the longer it takes to decelerate. myScrollRect.decelerationRate = 5.0f; } }