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 /
  • Help Room /
avatar image
1
Question by Skyl3r · Nov 29, 2015 at 07:51 PM · c#cameravr

Creating a Reticle with Google Cardboard SDK

Hello! This might be a simple issue; but I can't seem to figure it out.

I want to put a reticle in the center of the google cardboard view so the user knows what they are looking at.

I figured "Oh, I'll just use a GUI element and GUI.Draw to place a reticle in the center of both cameras" so I did that and they are not centered because the google cardboard SDK does a camera distortion which makes finding the center a bit difficult. alt text

You can see the issue here. So does anyone have an idea as to what I could do to make this work? Does the reticle have to be a 3d object?

reticles.png (42.4 kB)
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

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Skyl3r · Nov 30, 2015 at 12:39 AM

Well, I figured it out. If someone finds a better solution, I'll select that as an answer; but in the meanwhile here's what I did:

Create a sphere or other 3d object that will act as a reticle. Set it's shader to be the Cardboard SDK's Solidcolor shader. This will make it render on top of all other objects to get the appearance I desired.

Here's some good resources I found on my search:

Google's Unity Developer Guide (Look under "GUI in VR" for cursor options.)

Make an object draw on top of others

Here is the result from that: alt text


reticles.png (379.9 kB)
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
avatar image
1

Answer by toast_25 · Jan 26, 2016 at 10:47 PM

So recently there was an update on the Unity SDK, they included a script called CardboardReticle, and you can use this to make the reticle, but it's a little tricky.

What you want to do is make a MeshRenderer that's a child of the MainCamera in the CardboardHead prefab, I did that by creating a sphere and deleting everything but the transform and the mesh renderer (That's how you tell I'm a Unity noob, tell me if there's a better way).

Once that's done drag the CardboardReticle script (under Cardboard>Scripts>UI) to the mesh renderer, select CardboardReticleMaterial as the MeshRenderer's material ('Element 0' is how it appears to me) and you should have your reticle! Just adjust the reticle distance from the cameras to adjust it's size, and don't forget do disable shadows.

You should have something like this: alt text


reticle.jpg (87.1 kB)
Comment
Add comment · Show 3 · 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 toast_25 · Jan 26, 2016 at 10:51 PM 0
Share

I forgot to mention, you can probably customize it more by modifying the script. Here is the google doc.

avatar image kaolin · Feb 07, 2016 at 09:57 PM 0
Share

Stupid question from another newb ... I can't find the CardboardReticle script. I'm using the UnityCardboardDemo. Is there something I didn't import, maybe?

avatar image Nikkilak kaolin · Feb 11, 2016 at 03:03 PM 1
Share

You need to import the UnityCardboardSD$$anonymous$$ as well.

avatar image
0

Answer by Martinez-Vargas · Dec 13, 2016 at 09:22 PM

https://drive.google.com/file/d/0B5KfsA8t5eKdVlI2OTl2TTRwWmM/view?usp=sharing

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

43 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I offset a camera when it's position is defined by a VR controller 0 Answers

Tracked Pose Driver has position support range error on VR 0 Answers

How to Lock Steam VR camera to the head of the Player model 0 Answers

Fix rotation skipping 0 Answers

Planet Earth at real scale in Unity possible? 0 Answers


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