Question by
RealSoftGames · Apr 07, 2017 at 02:38 PM ·
uiscrollviewcontentwrap
ScrollRect view wrap content
Hello, im trying to get a flowing wrap for my content.
I have content snap, and a small delay. all works fine but this part here. i have the Movement type to Elastic, however when i do a quick swipe the content does not go past 0 or 1 so this does not work because of that reason. Is there a way to make the scrollbar value less than 0 and greater than 1 or perhaps im looking at this the wrong way?
if (scrollbar.size < size - _size && scrollbar.value == 0)
{
Vector2 vel = scroll.velocity;
scroll.horizontalNormalizedPosition = 0.8f;
scroll.velocity = vel;
}
else if (scrollbar.size < size - _size && scrollbar.value == 1)
{
Vector2 vel = scroll.velocity;
scroll.horizontalNormalizedPosition = 0.2f;
scroll.velocity = vel;
}
Comment
Your answer
Follow this Question
Related Questions
How to create a scrollable inputfield using new UI 1 Answer
How to create a scrolling menu that scales to all screen sizes 2 Answers
How to incress scroll wheel viewport without incressing the size 0 Answers
move automatically to item in scroll rect 0 Answers
UI ScrollRect inertia does not work between 35-50% 7 Answers