Author Topic: UIScroll View Content Origin is broken.  (Read 7180 times)

Redd

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 1
  • Posts: 10
    • View Profile
UIScroll View Content Origin is broken.
« on: December 09, 2014, 01:27:38 PM »
I find the TopLeft, Left and BottomLeft all behave the same way.  They will anchor only to the left.  The same goes for these other groups:  The Top, Center and Bottom will only center and the TopRight, Right and BottomRight will only anchor to the right.

My expectation is that it should anchor in respect to UIPanel.  Is anyone else experiencing this same issue?

I will be grateful for any help you can provide.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIScroll View Content Origin is broken.
« Reply #1 on: December 09, 2014, 02:00:27 PM »
It's not an anchor. It's a pivot origin point. It's not the same thing.

Redd

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 1
  • Posts: 10
    • View Profile
Re: UIScroll View Content Origin is broken.
« Reply #2 on: December 09, 2014, 02:30:46 PM »
I apologize I got the terms wrong.  The pivots do not seem to work correctly.  e.g. The Content Origin for TopLeft should set the pivot to the top left corner of the UIPanel.  Instead it behave like the Content Origin for Left.  The same applies for BottomLeft.  Can you verify if this is the case?

I will appreciate your help with this situation.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIScroll View Content Origin is broken.
« Reply #3 on: December 11, 2014, 08:23:05 AM »
Works fine on my end.
- New scene.
- Created a scroll view.
- Created a sprite inside it, duplicated it a bunch of times.
- Changed scroll view to be Vertical, content origin to top-right, right-click scroll view, reset clipping position.
- Content is now in the top-right.

Keep an eye on the horizontal vs vertical Movement type. It matters. If your content is laid out from left to right, you want to use Horizontal, but it also means that the scroll view will not use "top" or "bottom" at all, since it's restricted to the horizontal movement.

Redd

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 1
  • Posts: 10
    • View Profile
Re: UIScroll View Content Origin is broken.
« Reply #4 on: December 18, 2014, 03:16:49 PM »
Thanks, it seems toggling between the Horizontal, Vertical and Unrestricted Movements addressed my issue.  It would nice when switching between these that it will limit the Content Origin options.  i.e. For Horizontal movement, display only Left, Center and Right.  Vertically movement, just Top, Center and Bottom.  And Unrestricted movement, all directions.

Once again, thank you for your time.