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
0
Question by Ice52 · Oct 19, 2016 at 11:23 AM · androidunity 5raycastvr

Unity Daydream Preview - Raycast/camera alignment

I've just rebuilt my Google Cardboard game using the new Unity Daydream Preview, Previously I was using a recent version of the Google VR SDK.

I am using a raycast forward from the camera to determine the users gaze and allow interaction with objects via staring at them (actually just a slightly modified VREyeRaycaster from the VR standard assets: https://www.assetstore.unity3d.com/en/#!/content/32351)..

During testing I noticed that sometimes I needed to gaze above or below the object before it would register the raycast collision. It was as if the ray or hitboxes had been moved relative to the camera.

It seems to be consistent throughout the scene once it had been loaded (e.g. I always have to look slightly above all the objects, by about the same amount, to trigger the action).

I also think it is linked to the orientation of the phone when you load the scene, (or possibly the whole game), if I load things with the phone in landscape as if in the headset, the raycast seems to be aligned, if I load things with the phone flat on the desk or at a 45 degree angle that is when it is way off.

Any ideas what might be going on?

P.S. I've uploaded the version to google play as a public beta if you want to take a look:

https://play.google.com/apps/testing/uk.co.softkitty.puzzleroom

Comment
Add comment · Show 1
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 Glurth · Oct 20, 2016 at 12:30 PM 0
Share

As a sanity check: is it possible this is due to the phone being misaligned in the headset? You can draw an X'ed-box around the raycast hit point, ensuring it follows your gaze properly, to confirm that a misalignment is not the issue.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Ice52 · Oct 21, 2016 at 08:57 AM

Think I may have found the answer.

I was using my own "neck" script to update the camera transform, (in the version of the Google VR SDK I was using previously, this was missing). After disabling this the problem disappeared.

The camera view still seemed to be accounting for neck though, so I suspect this has been put back into the SDK. Still don't quite understand why its affected by the orientation of the phone when initialising the level, but I think the lesson is don't update the camera transform in your own scripts.

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

178 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

AndroidManifest-main.xml merging error 6 Answers

How to move the camera in VR mode? 2 Answers

Android VR Application crashing without splash screen. 0 Answers

Camera Follow Script destroys Raycast on VR-Hands with Late Update 1 Answer

VR FPS controller dosen't work on android 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