virtual-reality

Three.js - VRControls integration - How to move in the scene?

筅森魡賤 提交于 2019-12-03 22:12:49
问题 I use Three.js to render and move (my orbitControl changes camera.position) in a small scene. Now I have an oculus rift. So I added VRControls and VREffect. There is no problem to move the head. But I can no more move in the scene because VRControls override the camera parameters : object.quaternion.copy( state.orientation ); // object is the camera I thought that it was easy to correct : I have only to update the camera instead of overriding it : object.quaternion.copy(stateOrientationQuat

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 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()

Stream youtube video for Google Cardboard - Android

冷暖自知 提交于 2019-12-03 06:07:40
I want to stream a 360 video from YouTube in my android app in such a way that it is compatible with Google Cardboard- that is, I want the video to be streamed side by side like in CardboardView. I have been searching the internet about this and I don't seem to have much luck with it. So any amount of help would be heavily appreciated. Thanks in advance! 来源: https://stackoverflow.com/questions/30870607/stream-youtube-video-for-google-cardboard-android

Persisting angle of solid objects while rotating

限于喜欢 提交于 2019-12-02 14:47:54
问题 I am new to Unity and Oculus . I have a bunch of images (their path and other information are loaded from a JSON file) which I am trying to render in a VR room. And want to give the user an experience that he can move these images within that room using Oculus Touch . I placed an Empty Object which has a script that iterates through JSON and creates a prefab object (which has Rigid body , Box Collider and OVRGrabbable -so that it can be grabbed in VR, components). Moreover this prefab object

Unable to change camera position when using VRControls

北城以北 提交于 2019-12-02 00:17:39
I have the following code: ... camera = new THREE.PerspectiveCamera(75, screenRatio, 1, 10000 ); camera.position.z = -10; // position.set(0, 0, -10) also not working. controls = new THREE.VRControls( camera ); effect = new THREE.VREffect( renderer ); effect.setSize( window.innerWidth, window.innerHeight ); ... VRControls are working in sync with the accelerometer, but I can't change the cameras position. It seems stuck in the origin point (0,0,0). It was working just fine before applying VRControls and VREffect. Found the solution inside Sechelt demo from Mozilla VR Team demos . I'll put here

Unity Cardboard Orientation Landscape Right Upside Down

可紊 提交于 2019-12-01 20:26:30
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. Thus I have an upside-down objects. Any method to fix this? Thanks. It appears the native code that the

How to navigate in Google VR view?

拈花ヽ惹草 提交于 2019-12-01 08:52:41
I am writing an android app using VrPanoramaView I know there are two ways to navigate in VR apps Use the single button on the cardboard as a click Treat looking at something for a long period of time as a click How can i implement navigation using one of these so that if user clicks button panoview will skip to the next picture? Below is the sample Vr PanoramaView code ** * A basic PanoWidget Activity to load panorama images from disk. It will load a test image by * default. It can also load an arbitrary image from disk using: * adb shell am start -a "android.intent.action.VIEW" \ * -n "com

How to navigate in Google VR view?

一世执手 提交于 2019-12-01 06:36:08
问题 I am writing an android app using VrPanoramaView I know there are two ways to navigate in VR apps Use the single button on the cardboard as a click Treat looking at something for a long period of time as a click How can i implement navigation using one of these so that if user clicks button panoview will skip to the next picture? Below is the sample Vr PanoramaView code ** * A basic PanoWidget Activity to load panorama images from disk. It will load a test image by * default. It can also load

Unity ui mask not working on google pixel device

有些话、适合烂在心里 提交于 2019-12-01 06:23:39
I am making a scrolling ui panel and apply mask to ScrollRect component, which should hides parts outside panel area. I am using unity version 5.4.2f2-GVR. Mask work correctly on pc when i deploy it on google pixel device its not working. Is this bug of unity version or something else.... I got around this issue by using RectMask2D Component instead of the regular Mask . If somebody else got this problem and Bahman_Aries solution is not enough, try this: File > Build Settings > Player Settings>XR Settings (or Other settings if you are working in older versions of unity) > Daydream (click on