google-cardboard

How can I find the rotation of the head in Google Cardboard Unity3D?

心已入冬 提交于 2019-12-24 03:27:26
问题 Hey guys how do I find the rotation of the phone with Google Cardboard SDK in Unity3D, like the way the persons head is facing? I need to find if it is facing more towards the east, the west, or the north. Do I find the rotation of the head, or the parent Main camera? 回答1: The Cardboard class contains a property called HeadRotation which is a Quaternion. Quaternion crtRot = youCardboardController.HeadRotation; To use its rotation like you'd in Unity with directional vectors you may simply

three.js — fit a background image panorama

时光毁灭记忆、已成空白 提交于 2019-12-23 03:38:10
问题 I am trying to put this image -- https://hdfreefoto.files.wordpress.com/2014/09/bright-milky-way-over-the-lake-at-night.jpg -- as a panorama background in my three.js scene. I have the following code: var sphere = new THREE.SphereGeometry(200, 200, 32); sphere.applyMatrix(new THREE.Matrix4().makeScale(-1, 1, 1)); var sphereMaterial = new THREE.MeshBasicMaterial(); sphereMaterial.map = THREE.ImageUtils.loadTexture(<path to above image>); var sphereMesh = new THREE.Mesh(sphere, sphereMaterial);

Magnet script for UNITY 3D

こ雲淡風輕ζ 提交于 2019-12-21 23:22:21
问题 I'm working on a Google Cardboard project, right now i have a demo for Android where u can look around in a special scene i build in UNITY 3D, everything is working fine & looking good, but what I really want is: I want to walk forward when I press the Google Cardboard magnet button. I found a few script's on the web, but I do not know exactly how to make these scripts work in my UNITY project. Can anybody help me further with this? 回答1: Assuming you are able to read the magnet input

How do you use Processing for Android to display a stereoscopic image in a Google Cardboard device?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 05:45:29
问题 Processing was designed to make drawing with Java much easier. Processing for Android has the power of its desktop sibling plus information from sensors. Putting these things together, shouldn't it be easy to display a stereoscopic image and move around it like Oculus Rift or Google Cardboard? 回答1: The code below displays an image in two viewports - one for the left eye and one for the right eye. The result is that the image looks 3D when viewed from a Google Cardboard device. Accelerometer

Display a gstreamer video feed into Google Cardboard SurfaceTexture

懵懂的女人 提交于 2019-12-21 01:40:09
问题 I'm using gstreamer to retrieve a video feed (sent from a RaspPi), and I need to display it into Google Cardboard. I based my work on the tutorial-3 example of gstreamer. I managed to display my video into a SurfaceView, by giving my Surface (retrieved from SurfaceView.SurfaceHolder.getSurface() , but I now need to connect it with the Google Cardboard. If I do not mistake, Google Cardboard relies on some SurfaceTexture. So I thought it would be easy to simply get the Surface from the

Google Cardboard VR sensors

你离开我真会死。 提交于 2019-12-20 10:28:11
问题 I'm using the Google Cardboard (its HeadTracker class) to detect certain things about device rotation in an AR application. It works very well. However, on some devices, it doesn't work (nothing happens). I assume this is because they don't have the necessary sensors. My questions: 1) I want to detect at runtime whether the current device supports the HeadTracker, i.e. it has the necessary sensors available. For this, I need to know which sensors are used by HeadTracker, so that I can query

Unity GVR Cardboard Camera incorrect work on Android

☆樱花仙子☆ 提交于 2019-12-20 02:39:12
问题 I have prepared unity environment to work with Google VR cardboard. Sample project performs fine and all is good. In my project I have Main Camera object, which moves across the scene. I've added "Strereo Controller" (Script) component to the camera and it works fine in Unity editor. But when I start project on Android device camera stand still on one place and doesn't move. What can it be? 回答1: You can't move the VR Camera, it's the SDK that determine the mainCamera position. In order to

Unity Cardboard Orientation Landscape Right Upside Down

允我心安 提交于 2019-12-20 02:37:14
问题 Hi I have a Unity app which uses google Cardboard SDK to enable stereoscopic view so I will have a VR enabled app. My app runs perfectly fine. But there is a problem if I set the player settings orientation to be auto orientation with only landscape left and landscape right allowed. When it is in landscape left, everything works as per normal but when it is in landscape right the cardboard view will turn 180 degrees (settings button moved to bottom of screen) but my unity objects does not.

How to reduce the lag in VR games in unity

拟墨画扇 提交于 2019-12-19 04:47:37
问题 I have been building a game for VR using Unity3d. It has only low poly models and the file size is less then 40 mb still the game lags when played on mobile.. Please suggest how to improve the performance.. Thank you in advance.. 回答1: In order to improve performance in VR for mobile you have to optimize everything as best as you can, you should keep some of these variables in mind: Graphics Side - Number of polygons in the scene - How many source of lighting do you have Programming Side - How

How to play audio in Unity (Click Event Trigger Cardboard SDK)?

落爺英雄遲暮 提交于 2019-12-14 02:36:29
问题 I'm using the Cardboard sdk and have configured Gaze Input Module in Event System. Have also added a collider to my object. I want to look at the object and play audio when I pull the trigger on my Cardboard HMD. However, it's currently not playing. Can you advise if the problem is with my code: using UnityEngine; using UnityEngine.EventSystems; using System.Collections; [RequireComponent(typeof(AudioSource))] public class Kim : MonoBehaviour { public GameObject kkhair; public AudioSource