Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: xbelt on March 07, 2014, 04:55:08 AM
-
Hello,
I apologize if this is not the correct forum to ask such a question, but I think it would be easier to solve my problem with NGUI and not with Vectrosity.
My problem is, that all Vectrosity elements are drawn ontop of my GUI. In my case I need the GUI to be drawn on top of Vectrosity. I have the normal NGUI camera which is on depth 1 and the mainCamera which is on depth 0 and which draws all vectors.
Is there someone who can help me in this matter? I already tried to set the z coordinate of the drawn vectors accordingly but they still get drawn ontop of the GUI.
Kind regards
Lukas
-
try setting the uipanel's renderQ value to something over 3000
-
I honestly don't remember how vectrosity draws things anymore. This might be a better question to the plugin's author.
-
You probably have to define which camera has to render vectrosity elements. And the UI camera should be above it.
-
try setting the uipanel's renderQ value to something over 3000
This should work. We're using Vectrosity and NGUI together with the same camera with NGUI panels rendering on top.
-
For possible others with this same issue:
Not sure for the do's and don'ts but this worked for me:
I set the canvas component for the vectrocity elements to screenspaceCamera and sorting order to -1 through code. Make the canvas use Ngui's camera and ajust Ngui's culling mask to use UI. For some reason the canvas jumps back to RenderMode overlay, this is why you have to set it through code. Then include the canvas adjustments in a method when u first use the vectrocity elements after startup. Also whith this method you need to keep screen resizes in mind.
EDIT: Also remember to set plane distance to 0 and here is a link to some code for to help with resolution/orientation changes:
http://forum.unity3d.com/threads/device-screen-rotation-event.118638/
cheers!