Author Topic: ExampleDragDropItem and UIdragDropRoot  (Read 3936 times)

pcutile

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 81
    • View Profile
ExampleDragDropItem and UIdragDropRoot
« on: November 21, 2014, 07:21:00 PM »
i use a gameobject with a script ExampleDragDropItem connected. the object is in a UIRoot (3d) and is clearly visible and clickable. external to the uiroot there is a script UIDragDropRoot. Problem is seen when I run and I click on the icon Exampledragdropitem, the icon does not follow the mouse pointer and the X-coordinate is reversed. When I release the mouse button, the 'object is instantiated in the right spot, only the' icon does not follow the mouse, because it goes in the opposite x

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ExampleDragDropItem and UIdragDropRoot
« Reply #1 on: November 21, 2014, 09:09:06 PM »
Alright first, drag & drop is meant to work with 2D UIs, not 3D. I don't know if its code will even work with 3D ones. If you want 3D UI drag & drop, look at the character example scene. It does drag & drop differently there.

Next, the UIDragDropRoot should still be a part of your UI. You shouldn't be placing it outside of it. UIDragDropRoot should be on a child panel -- a panel with higher depth.