Search Unity

Scroll handle working in reverse

Discussion in 'UGUI & TextMesh Pro' started by Shadowing, Aug 28, 2018.

  1. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    I have this issue with the scroll bar on my chat.
    I made a test project and it doesn't do it on that project.

    I'm not sure what is different. All the rect settings are all the same.

    The scroll bar it self works as it should. The problem is the direction that i drag the scroll bar is opposite of what it should be.
    so if i drag it upwards the scroll handle goes goes down and if I drag it downwards the scroll handle goes up.

    Anyone have any ideas?

    Using latest version of LTS
     
  2. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    I read in Unity Answers that setting the sensitive to a negative number fixes this but that didn't fix it for me.
     
  3. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    I figured it out. sliding area wasn't wide enough. I had to shrink that and then decrease handle size and that fixed it.
     
    rubicogames likes this.
  4. huulong

    huulong

    Joined:
    Jul 1, 2013
    Posts:
    224
  5. huulong

    huulong

    Joined:
    Jul 1, 2013
    Posts:
    224
    As it turns out, when dealing with vertical scrolling, while Bottom to Top direction can solve issues when working with Scroll View widget / ScrollRect component, when working with scrollbar programmatically (manually moving content under mask), the values are more intuitive to work with Top to Bottom (offset increases when scrolling down). Of course, when working programmatically, the scrollbar value is abstract and it's up to you to decide how to match it to content translation, so you can always find the right operation to make it move the way you want...

    But just to say that if you're working with just a Scrollbar and custom code, you may have everything reversed compared to a full Scroll View with ScrollRect and Scrollbar child, just like me.