Welcome,
Guest
. Please
login
or
register
.
February 14, 2025, 07:14:22 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UIDragDropItem with perspective camera issue.
« previous
next »
Print
Pages: [
1
]
Author
Topic: UIDragDropItem with perspective camera issue. (Read 2156 times)
Sahkan
Jr. Member
Thank You
-Given: 9
-Receive: 0
Posts: 74
UIDragDropItem with perspective camera issue.
«
on:
February 22, 2016, 09:34:34 AM »
When Using this script on an object which has localPosition.z value different then zero, It will have an offset from the mouse position.
Is there a way to make it consider the object's z value?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: UIDragDropItem with perspective camera issue.
«
Reply #1 on:
February 22, 2016, 07:11:38 PM »
Check what the Inventory example does that comes with NGUI. UIDragDropItem is for 2D UIs.
Logged
Sahkan
Jr. Member
Thank You
-Given: 9
-Receive: 0
Posts: 74
Re: UIDragDropItem with perspective camera issue.
«
Reply #2 on:
February 23, 2016, 01:05:48 AM »
Quote from: ArenMook on February 22, 2016, 07:11:38 PM
Check what the Inventory example does that comes with NGUI. UIDragDropItem is for 2D UIs.
Thanks but it seems like in this scene the mouse corsair get an sprite attached to it.
I need is an actual 3D object that rotate around while dragging it and also changes it's height dynamically depends on the place it is hovering on on the scene.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: UIDragDropItem with perspective camera issue.
«
Reply #3 on:
February 25, 2016, 09:56:18 PM »
That's not an NGUI question. NGUI can tell you what's under the mouse if you like (subscribe to UICamera.onDrag and check UICamera.currentTouch), or you can do your own raycast. Positioning the 3D object based on your drag isn't NGUI.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UIDragDropItem with perspective camera issue.