Author Topic: "Scroll Wheel Factor" in UIDraggable Panel does nothing?  (Read 3390 times)

puargs

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
"Scroll Wheel Factor" in UIDraggable Panel does nothing?
« on: May 06, 2013, 09:52:09 PM »
In my 3D UI, I have a UIPanel with a UIDraggable Panel Script attached. Underneath is a UI Grid with items that get attached programmatically. Everything seems to work fine and everything scrolls well, looks good etc.

Except the scroll wheel - the scroll wheel doesn't seem to do anything. No matter what number the "Scroll Wheel Factor" is set to (0, 1, 100, 1000, anything), it doesn't seem to work.

Any ideas on what I'm doing wrong?

puargs

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: "Scroll Wheel Factor" in UIDraggable Panel does nothing?
« Reply #1 on: May 07, 2013, 09:19:26 AM »
I checked and the "Scroll" event is not even getting called when using the scrollwheel.

Abnaxus

  • Guest
Re: "Scroll Wheel Factor" in UIDraggable Panel does nothing?
« Reply #2 on: May 07, 2013, 09:29:50 AM »
Not sure, but I think I read it's a bug which going to be fixed on the next release.

I let ArenMook confirms.
« Last Edit: May 07, 2013, 09:35:39 AM by Abnaxus »

puargs

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: "Scroll Wheel Factor" in UIDraggable Panel does nothing?
« Reply #3 on: May 07, 2013, 09:43:17 AM »
OK I actually got it scrolling now, except it scrolls on the Z-axis instead of the X-Y axis??

The problem with it not scrolling was that the prefab I was using for the grid item didn't have the "UIDrag Panel Contents" script attached. Now that it is attached, it's getting the events, but it causes the panel to scroll along the Z axis! Note that the scrollbars themselves work fine along the x-y axis, but the scroll wheel for some reason does z axis instead.

puargs

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: "Scroll Wheel Factor" in UIDraggable Panel does nothing?
« Reply #4 on: May 07, 2013, 09:56:43 AM »
OK it looks like the "scale" value on "UIDraggablePanel" is what is throwing it off. The "Scale" value is NOT relative to the rotation of the object - it's relative to the rotation of the world. This is causing the object to go off on some wacky vector whenever I scroll.

puargs

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: "Scroll Wheel Factor" in UIDraggable Panel does nothing?
« Reply #5 on: May 07, 2013, 10:12:32 AM »
I have "fixed" the problem by changing my 3d UI to be exactly on the XYZ axis of the world view (zero rotation). Then set the scrolling to be only on the Y-axis.

This works for now, but I have a lot of camera moving back and forth between the 3d menus (because it looks cool), but I don't want to have to restrict my scrollable panels to be XYZ axis zero rotation only.