Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by benblo · Oct 20, 2009 at 04:30 PM · gui3drendertexturematrix

Can I use UnityGUI to make a 3D GUI?

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.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
5
Best Answer

Answer by AngryAnt · Oct 21, 2009 at 08:44 AM

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.

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image benblo · Oct 21, 2009 at 09:36 AM 0
Share

Hmm... no I don't want 3D objects in my GUI, what I want is for example a GUI button appearing on a 3D wall, and then to be able to click that button. I just don't know how to build the proper matrix (I tried using the localToWorld$$anonymous$$atrix or worldToLocal$$anonymous$$atrix of the wall transform but the GUI disappears... it probably makes no sense anyway!)

avatar image AngryAnt ♦♦ · Oct 21, 2009 at 09:46 AM 0
Share

Ah that is a completely different question from your original wording. $$anonymous$$ight want to start a new question on that. What you are talking about is in-scene GUI, right?

Something like this: http://feedback.unity3d.com/pages/15792-unity/suggestions/163344-unitygui-render-gui-to-texture?ref=title

That is a feature request, but I've been toying a bit at home with hacking the GUI system into doing this. No breakthrough so far though.

avatar image benblo · Oct 21, 2009 at 10:01 AM 0
Share

Hmm yeah my question title and content can be interpreted in different ways I guess... I asked to "get my GUI to show up in 3D space".

I hate the idea of RenderToTexture since the GUI is obviously already rendered, just shown in 2D. I just don't know how far we can go with GUI.matrix. Best thread I've found so far is this one: http://forum.unity3d.com/viewtopic.php?t=22520&highlight=gui+matrix

Apparently no one's done it, what I'm trying to figure out is if it's technically possible at all.

avatar image AngryAnt ♦♦ · Oct 21, 2009 at 11:08 AM 0
Share

That thread describes exactly what I've just told you. I even replied with the same answer to that thread. For GUI on in-game 3D objects, I still think you should create a new question and phrase it like that.

avatar image
0

Answer by Brian-Kehrer · Oct 21, 2009 at 02:20 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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

A 2D GUI in mid air, for oculus, tracking an object. 1 Answer

Changing 3d text through script 1 Answer

How to render pixelated light? 1 Answer

3D RenderTextures with Depth Not Supported (worked in <=2017.1, broken 2018+) 1 Answer

Orthographic environment with Interface 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges