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.