Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: joreldraw on October 09, 2012, 01:17:59 PM
-
Hi.
Im again with my draggable panel with 3d objects.
Now i use a 3d camera with the UIViewport how you recomend me.
But now im having an issue.
When i drag the object, apparently everything works fine.
But when i click on an object, not work. I need to click in her original position.
I think that is a kind of update problem.
I check gizmos and collidesr move with the objects right, but is how a gosth the action of this colliders, ever in the same position. Out of the objects when drag...
My hierachy is a Root with the 3d Cam and the 3d elements and with UIViewport linked to another 2d cam in another root with my UI Bg and draggable panel.
Any solution?
Thanks
-
"but is how a gosth the action of this colliders" -- what?
-
The click event not is efective where really is the collider.
This is effective in her original position before Dragg the panel
-
Double check the size and position of the colliders. For example if you have a 2D camera with the near clipping of 0 and far of 10, any collider placed at the Z of 0 may or may not receive an event. Likewise if you resized some widget, make sure to update its collider as the two are not related.
-
Not work.
If i drag the panels, imagine that collider dont move, but the object move.
I need to click on old collider position to work.
How can the UiVeiwport refresh and repositione the colliders ?
-
Well, i test so much and the collider position move when drag.
The issue is so strangle.
I solved it moving the collider in X her X size, is how internally the collider displace to left her size and go out of the object.
-
Not fully resolved.
The problem is related with field of view of the 3d camera.
If i change this, the collider go back again to another position...
This problem can be related too with 3d cam, if i change to ortographic all work fine.
-
3D UI's widget position should match your colliders assuming you updated the colliders (NGUI menu -> Add Collider) after moving the widgets around.
-
For 3d ui you tell me i need to do:
1.- Move the 3d object
2.- Attach a new collider on the new position?
When i drag the panel i make this in each frame render?
-
Depends on your setup. If you have a button for example, moving its background (which is a child), would cause the collider to no longer match what's there. Selecting the collider and doing Add Collider via the menu updates it properly.