virtual-reality

Android VR Toolkit - HeadTransform getHeadView matrix representation

社会主义新天地 提交于 2019-12-22 00:13:15
问题 I'm starting with Android VR-Toolkit for google cardboard. I use the sample at google website: https://developers.google.com/cardboard/get-started I new with openGL and try to figure out how the values are represented by the system. For example HeadTransform.getHeadView set a 4x4 matrix and according to the documentation: A matrix representing the transform from the camera to the head. Head origin is defined as the center point between the two eyes. My question is what represents every value

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

Unable to change camera position when using VRControls

一曲冷凌霜 提交于 2019-12-20 03:12:40
问题 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

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

Aframe, VR website, unable to turn left right using android phone

こ雲淡風輕ζ 提交于 2019-12-18 09:27:13
问题 I have been working on this VR website for my project for sometime. It used to be able to allow user to view left/right side of the virtual world by moving your phone to the left/right. However, just recently, it suddenly did not work for android phone. I have tested on iphone/ipad, still works as per normal. But for some reason, i tried using note8 , s7 it doesnt work anymore. Would really appreciate if you can identify whats the problem, and how can I fix it? Thank you very much. 回答1: Try

How to access mobiles back button in unity for android applications

[亡魂溺海] 提交于 2019-12-18 09:11:02
问题 I am building a VR application with a menu scene and many other scenes.. I would like to get back into the menu scene from any other scene when the user hits the mobiles back button (android).. What is the script for that and where should i place the script?? 回答1: You use the Escape keycode to detect back button press on Android. using UnityEngine.SceneManagement; void Update() { if (Input.GetKey(KeyCode.Escape)) { SceneManager.LoadScene("Main Menu"); } } 来源: https://stackoverflow.com

Three.js StereoEffect cannot be applied to CSS3DRenderer

╄→гoц情女王★ 提交于 2019-12-13 19:47:23
问题 I'm in the process of developing a chrome VR web app. Now I'm desperately trying to figure out how to render a website into my into my stereoscopic scene which has some meshes in it. So I have my renderer for the meshes, which works well. The following code is only the relevant snippets: var renderer = new THREE.WebGLRenderer(); Then i have my stereoeffect renderer which receives the webgl renderer: var effect = new THREE.StereoEffect(renderer); Next is that I create the website renderer, and

How to transform an Android bitmap to wrap a cylinder and change perspective

核能气质少年 提交于 2019-12-13 12:20:14
问题 I wrote a sample app that allows the Android user to take a picture and have the text content from a view as an overlay on the image and saved to a gallery album: What I would like to to is transform the text bitmap before joining the two images. Specifically, I'd like to make the text curve up on the sides (simulating wrapping around a cylinder), and make it larger at the top than the bottom (simulating a top down perspective), as illustrated here: There is no need to interpret the camera