google-cardboard

Magnet script for UNITY 3D

回眸只為那壹抹淺笑 提交于 2019-12-04 17:24:59
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? Assuming you are able to read the magnet input correctly. This is how I did an FPS style controller script: In Unity5 import the asset package Standard Assets

Google Cardboard - are there an iPhone / iOS starter projects for the Cardboard VR kit?

十年热恋 提交于 2019-12-04 11:46:16
问题 I'm looking at the Google Cardboard kit, an inexpensive VR setup that uses Android Devices to play 3d VR games. I see that they have an Android demo project, but is there any iOS or Objective-C port of the Cardboard project? If not, are there any other VR projects for iOS that can be modified to work with the cardboard kit? 回答1: June 2015 update Google has added iOS support to their official Unity SDK. Even though the Unity plugin bundles a pre-compiled iOS Cardboard binary, there doesn't

missing GVRMain file in Unity

拟墨画扇 提交于 2019-12-04 09:37:55
I am trying to create a Google Cardboard app using Unity. The new SDK doesn't have GVRMain, so I used GVREditorEmulator instead. However, I can't "look around" in the project. I am using a Windows PC, and Unity 5.6 Looks like Google updated its GoogleVR SDK and GvrViewerMain is replaced by GvrEditorEmulator. https://developers.google.com/vr/unity/release-notes What you're most likely missing is the Camera script which has to talk to the Gvr Editor Emulator. Click on the GvrEditorEmulator In the inspector see Camera: None (Camera) This is where your camera should be referenced. I was able to

Detect Google Cardboard Magnetic Button Click in Javascript

本秂侑毒 提交于 2019-12-04 04:44:21
问题 With refering to Detecting Magnetic Button on Cardboard in C# is there anyway to access the magnetic cardboard button within Javascript in a browser of a mobile phone? cheers Stefan 回答1: I was finally able to solve the problem myself. Fortunately time and a bit of luck helped for solution (it wouldn't have been possible by the time I was actually asking for it). The solution is based on the "Generic Sensor API" proposed by the W3C and in particular the implementation for the Magnetometer API.

Move camera around using touch event in CardBoard and Rajawali VR Android

。_饼干妹妹 提交于 2019-12-03 20:59:59
Currently, I am working on VR application for android that using google CardBoard and Rajawali to play the 360 video. The sensor is working well, but I cannot use touch to drag the scene or camera around correctly. Is there any way to enable touch mode in this app? Any help is greatly appreciated! Thank you. I've worked on the same thing, and this is what I used: First, take a look at Rajawali's ArcballCamera class. You can see there how touch events are handled to rotate the camera with touch events. The problem is I didn't liked the default behaviour of the rotation when the user moved

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

Deadly 提交于 2019-12-03 20:44:05
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? 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 and gyroscope data are used to move the 3D image as the head is moved around. The only bug is that of

How to use RajawaliVR or Rajawali to play a 360 Video

余生颓废 提交于 2019-12-03 15:03:19
问题 I am having a hard time to figure out how to use the Rajawali to play a 360 video. In order to achieve this, I tried every solution I could find in the Internet, but I failed. Firstly, I used the RajawaliCardboard, and let the MainActivity extend from CardboardActivity . At the same time, in MyRenderer class, I let this class extend from the RajawaliCardboardRenderer class. In MyRenderer class, I overrided the initScene() function: protected void initScene() { StreamingTexture mTexture = null

Determining exact eye view size

纵然是瞬间 提交于 2019-12-03 14:41:06
In my Cardboard app for Android, I want to display an overlay in each eye that centers. Simply creating a LinearLayout with two centered views is fairly easy and works for most phones as the eyes are drawn to best fit: When that's not the case, getting something to center in each eye becomes a problem. It's most clearly illustrated when using a tablet: I'm trying to get the message "Buffering, 0%..." centered inside each eye view. The size of the render boxes for the eyes has a fixed dimension (of course, because the distance between human eyes has a fairly fixed size). Unfortunately,

How to make a simple VR video player by Google CardBoard Android SDK and Rajawali

人走茶凉 提交于 2019-12-03 14:26:15
I am a new man in these area. I am trying to change a program in github to play video for cardboard now. I modified the MyRenderer by using StreamingTexture. public class MyRenderer extends RajawaliCardboardRenderer { public MyRenderer(Context context) { super(context); } private MediaPlayer mMediaPlayer; private StreamingTexture streamingTexture; @Override protected void initScene() { mMediaPlayer = MediaPlayer.create(this.getContext(), R.raw.test); streamingTexture = new StreamingTexture("video", mMediaPlayer); Sphere sphere = createPhotoSphereWithTexture(streamingTexture); getCurrentScene()

How to make a simple VR video player by Google CardBoard Android SDK

心不动则不痛 提交于 2019-12-03 08:46:40
Im following as what Mog suggest in the post: How to create VR Video player using Google Cardboard SDK for Unity Here's my code snippet 1. In the MainActivity's onSurfaceCreated() method , I initialise a texture and bind it to GL, and create a surface and a mediaplayer associated to them. in the onNewFrame() method, I update the texture as what Mog said in the post I saved my short video as small.mp4 in the raw folder, however , after I start my app the two sides are blank, and the video's sound is actually playing. I was facing a similar problem in order to get this done I've used the great