It is my understanding that by tweaking GUI.matrix the right way, I could get my GUI to show up in 3D space... is it true?
Will the mouse clicks be "translated" by the matrix as well?
Has anyone got an example of how to build a proper matrix? I haven't managed to do it myself, matrices are not my forte and whenever I set GUI.matrix (other than by using GUIUtility.Rotate/ScaleAroundPivot), my GUI simply doesn't show up anymore.
GUI.matrix lets you translate the 2D planes that is GUI in three dimensions. Mouse events will be translated the same.
If you want real 3D objects in your GUI, an option would be to use render textures (Pro only feature) to render some 3D objects to a texture. This texture could then be displayed in your GUI and you could translate the cursor position to a 3D position in the 3D GUI scene.
This last method will of-course mean a lot more work, but you will have a lot more options for applying al sorts of effects to your, now 3D, GUI elements.
answered Oct 21 '09 at 08:44 AM
While it cannot be positioned in 3d space, it can be rotated in all 3 dimensions using the GUI.Matrix.
If you really need 3D GUI in 3D space and rotation, I'd recommend one of the sprite based GUI systems available in the forums, and then extending it using the event classes (delegates, etc) available in C#. These are generally much more flexible than the built in GUI, but require a fair amount of work.
answered Oct 21 '09 at 02:20 AM
"It is my understanding that by tweaking GUI.matrix the right way, I could get my GUI to show up in 3D space... is it true?"
That's not true. Unity GUI is 2d only.
answered Oct 20 '09 at 05:25 PM