Author Topic: How to, two Draggable Panels Next to each other?  (Read 2646 times)

ENAY

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 248
    • View Profile
How to, two Draggable Panels Next to each other?
« on: August 23, 2012, 02:09:49 AM »
When you use a Draggable Panel, the items outside the panel are still there, to avoid clicking on them you have a collider each side (as in the tutorial) to mask these areas so you don't click on them.

Right now I have two horizontal slider panels but they are positioned right next to each other so the off panel objects are interfering with the neighbouring panel. And Vice Versa.

Any tips on how to get around this? What I am planning on doing is making it so any objects that appear outside of the panel are disabled / moved a large distance in the Z direction. That should work, but just wondering if there is any other method, a better method.

Has anyone else come across this problem yet?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to, two Draggable Panels Next to each other?
« Reply #1 on: August 23, 2012, 05:46:47 AM »
Sounds tricky. Why not make your life easier and position your panels one below the other instead of beside each other?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: How to, two Draggable Panels Next to each other?
« Reply #2 on: August 23, 2012, 05:58:13 AM »
If you're doing what I think you're doing:
2 "slots" that both can scroll horizontally between "items" or something. So they essentially scroll items under each other when scrolling to the side, I would have to solution to fixing collider problems:

1) redesign it differently. (heh). it seems weird for the user I think, but that's your own call.
2) place two (non moving) gameobjects with colliders on top of the slots, and propagate the touch event down to the draggable panels from their respective slot object, then you have complete control over what gets sent where.

ENAY

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 248
    • View Profile
Re: How to, two Draggable Panels Next to each other?
« Reply #3 on: August 23, 2012, 07:37:31 AM »
Exactly. I wanted to position them diagonally to each other to avoid this issue. But then the designer will complain that I am not following the design document.

On another menu he already wants to me to make a DraggablePanel that when held down on a card allows me to drag it into another DraggablePanel. That Panel also needs single and double taps registering too. So 4 functions needed, all on a tiny iPhone screen. But that's a different story.