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 HanSoloYolo · Jul 22, 2017 at 05:15 AM · vrtouchquaternionorientationgyroscope

VR without a headset!?

I am new to Unity and am trying to make a game that where I am underwater and can look around and pop bubbles in VR without a headset.

I have 6, level 4, herniated discs in my spine and neck which makes any rapid turning or twisting extremely painful. VR Headsets are not an option for me. Turning my head with VR Headsets causes me tons of pain. I would much rather move my good arm to look around and touch what I am aiming at. Also, I don't think people like being blinded by VR Headsets.

Spending my time learning how to create my Fingertip-VR™ games for others to enjoy, especially those who are bedridden or do not have the full mobility that most take for granted. We can bring back cool arcade style games like Virtua Cop and Duck Hunt right on our mobile devices with this technology. How cool is that? Please help me learn!

Look what I have so far! https://www.youtube.com/watch?v=726Ej0Aykrw

This is the code for looking around my created environment with gyroscope without a headset:

 using UnityEngine;
 public class GyroController : MonoBehaviour 
 {
     private bool gyroEnabled;
     private Gyroscope gyro;
     private GameObject GyroControl;
     private Quaternion rot;
 
     private void Start () 
     {
         GyroControl = new GameObject ("Gyro Control");
         GyroControl.transform.position = transform.position;
         transform.SetParent (GyroControl.transform);
         gyroEnabled = EnableGyro();
     }
 
 
     private bool EnableGyro()
     {
         if (SystemInfo.supportsGyroscope) 
             {
             gyro = Input.gyro;
             gyro.enabled = true;
             GyroControl.transform.rotation = Quaternion.Euler(90f, -90f, 0f);
             rot = new Quaternion(0, 0, 1, 0);
             return true;
             }
         return false;
     }
 
     private void Update () 
     {
         if (gyroEnabled) 
         {
             transform.localRotation = gyro.attitude * rot;
         }
     }
 }


This is the code for the Raycast on Touch to Destroy Object:

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
 public class TouchDestroyer : MonoBehaviour 
 {
     Ray ray;
     RaycastHit hit;
 
     // Use this for initialization
     void Start () 
     {
         
     }
     
     // Update is called once per frame
     void Update ()
     {
         if (Input.touchCount > 0)
         {
             ray = Camera.main.ScreenPointToRay (Input.GetTouch (0).position);
             if (Physics.Raycast (ray, out hit, Mathf.Infinity))
 
             Destroy (hit.transform.gameObject);
         }
     }
 }



**Now I need to apply this knowledge http://blog.heyworks.com/how-to-write-gyroscope-controller-with-unity3d/ to either script attached to the main camera so I can reset the orientation by tapping with 2 fingers.

This way, if a kid was laying in a hospital bed they can tap with 2 fingers and set the view to their current gyro.attitude .

I know it is possible, because I hired a programmer to do it once. Here is his work in this video: https://www.youtube.com/watch?v=m-DqcUW-ifQ **

The issue is, I have a strong desire to create my own games. My injuries have left me feeling helpless, but this is something I believe I can do! I learned CAD and designed and 3d printed a wrist-mount for my phone, so I can use it with one arm.
https://www.youtube.com/watch?v=_z9UH_Efs-Y https://www.youtube.com/watch?v=emDoftIPnSU

Now I want to make games and software that I can reach out and touch!

Step 1: Learn how to reset or offset gyro attitude to the original camera angle and apply it to my current Script.

Step 2: Keep doing what I can with books and tutorials until I get stuck again and hope that the Unity Community is willing to help!

Sincerest gratitude, Derek Rieger

PS- Sams Teach Yourself: Unity Game Development by Ben Tristem and Mike Grieig along with a few YouTube Tutorial Videos has gotten me this far. I really appreciate those who take the time to teach others valuable knowledge.

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
0

Answer by HanSoloYolo · Aug 15, 2017 at 02:30 AM

I got it figured out. = )

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
0

Answer by unity_eaKm_7FNf4Uaww · Jun 13, 2019 at 06:32 AM

https://developers.google.com/vr/develop/unity/guides/magic-window

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

130 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

Related Questions

android camera rotation using gyro sensor 1 Answer

Maintain fixed vision while the player turn 0 Answers

If rotation was over 20° smoothly rotate towards the next 90° 2 Answers

Rotate main camera using phone gyroscope with +Z-axis always aligned to North direction and +X-axis aligned to East direction 0 Answers

Touch controllers Steam VR 2 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