Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

Feature Request ScollRect movement speed modifier by swiping

Discussion in 'UGUI & TextMesh Pro' started by chihunkim, Mar 30, 2023.

  1. chihunkim

    chihunkim

    Joined:
    Oct 6, 2016
    Posts:
    5
    I am using ScrollRect in many places in my app.
    and noticed that the default scroll speed is not fast enough in comparison with native UI or other non-unity app.

    I mean.. the auto scrolling by inertia after I finished a dragging.
    The initial speed is beging controled by m_Velocity field of ScrollRect source code.
    And the value is calculated from the hardcoded 10 multiplication as the following code:

    Code (CSharp):
    1. m_Velocity = Vector3.Lerp(m_Velocity, newVelocity, deltaTime * 10);
    I want to change the value "10" to a larger value.
    But there is no public setter for that,
    and I can't inherit and override the LateUpdate to modifiy.

    Any suggestion?

    Thanks.

    PS: I am using 3rd party widget libraries that requires the default ScrollRect,
    so I can't use custom ScrollRect implementation now.