Author Topic: Draggable panel (in world)  (Read 4304 times)

nzen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 30
    • View Profile
Draggable panel (in world)
« on: August 13, 2013, 05:42:35 PM »
I'm using NGUI as the GUI for an in-game computer screen, so it's 3D in the world.



  • Monitor
    • Mesh
    • Panel (UIPanel, UIDraggablePanel)
      • Item (UIDragPanelContents)
      • Item
      • Item

The problem is that UIDraggablePanel moves the object that it's attached to, so I can't get it to clip to the screen, because it's just moving the clipping window. Here's the setup:

Also, is there a way to slow the mouse drag speed?
« Last Edit: August 13, 2013, 05:50:00 PM by nzen »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable panel (in world)
« Reply #1 on: August 13, 2013, 07:53:55 PM »
TLDR version that I've explained many times now in this forum: 3D and clipped panels don't mix. Unity sorts things based on distance from the center of the object to the camera, so unless you force the contents of the panel to draw using a different shader that you create with a different render order, it simply won't work.

nzen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 30
    • View Profile
Re: Draggable panel (in world)
« Reply #2 on: August 13, 2013, 08:32:27 PM »
You should maybe add the info here - http://www.tasharen.com/?page_id=4444