Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Arvank · Jul 22, 2016 at 09:45 AM · guivrworldspace

Interacting with a world space GUI in VR

Hey everyone,

So I'm trying to create a GUI interface for this VR app I am creating. I'm trying to use Unity's UI system and created a canvas and several buttons, all in world space as suggested by Unity. Now along with this I created a reticle in the center of the player's camera, with the idea being that the player can aim at what button they want to press, and then press the "A" button on the controller to press it.

Now here's the issue. The raycast I have on my camera does not seem to detect any of the GUI elements, passing right through it and not giving me any output on my Raycasthit variable. Other surfaces and objects detect just fine though. I've been searching all over as to what this might be; adding the main camera as event camera, checking raycast targets on the GUI objects, checking if there's any collider in the way, but nothing seems to work. I looked up the way Unity did it in their VR samples project, but they don't even seem to be using their own GUI system for the main menu.

It is sort of important to get this working with Unity's GUI system, as most of the work I've done and plugins I use are dependent on this. If anyone could help me out with this, that would be great!

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

1 Reply

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

Answer by Arvank · Jul 27, 2016 at 07:07 PM

I'm pretty sure I just stumbled onto my own answer. Turns out that when you add a box collider to the GUI element, the resulting collider is incredibly tiny compared to the button. I didn't even see it at first, thinking it was just sized up to the border of the element itself and being hidden underneath it as you sometimes see when you have a mesh and a collider beneath it.

I adjusted the collider sizes of the elements and the raycast is now hitting properly. Next up is going to get the interaction going, but I guess this answers the question in this post. Marking as answered for any future devs who might have issues with this.

Cheers!

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to handle UI/Space mixed scene? 2 Answers

Detect If Pointer Is Over Any UI Element 6 Answers

UI elements don't show up in Vive? 1 Answer

uGUI input text in world space 0 Answers

test gear vr touch input in editor 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