virtual-reality

How do I properly reload a Unity Scene that uses MRTK for the Hololens2?

心已入冬 提交于 2021-01-29 21:54:39
问题 This is my first project using the Hololens and MRTK for Unity. I want to make a button that restarts the experience for the player when pushed. I connected a button to a new script with the following code: SceneManager.LoadScene(SceneManager.GetActiveScene().name); When the button is pushed the scene seems to reload, but all MRTK/Hololens functionality stops. The hand and eye-tracking are unresponsive, and I am unable to interact with holograms. I know I can manually make a reset method that

Unity3D Placing a cube in front VR player and move with player position and rotation

感情迁移 提交于 2020-12-07 05:14:51
问题 I am developing a VR scene using Oculus Quest. I need to place a cube in front and a few units below the user eye level. The cube has to move when the user moves. E.g. if the user turns or moves the cube user secure its position by always staying in front. How can I do this? Should I take the OVRCameraRig position and rotation and apply that to the cube? But I read from StackOverflow question Unity3D Getting position of OVRCameraRig that OVRCameraRig doesn't move and needs to consider the

Unity3D Placing a cube in front VR player and move with player position and rotation

陌路散爱 提交于 2020-12-07 05:10:35
问题 I am developing a VR scene using Oculus Quest. I need to place a cube in front and a few units below the user eye level. The cube has to move when the user moves. E.g. if the user turns or moves the cube user secure its position by always staying in front. How can I do this? Should I take the OVRCameraRig position and rotation and apply that to the cube? But I read from StackOverflow question Unity3D Getting position of OVRCameraRig that OVRCameraRig doesn't move and needs to consider the

Display an immersive 360 photo while using a website in a VR browser

微笑、不失礼 提交于 2020-06-27 06:30:14
问题 I started playing with WebVR and I'm trying to have a 360 immersive background dynamically change while a user is using my website. In this hypothetical situation the user would choose to launch the immersive experience running in the background around them while using the site. I'm still a newbie on WebVR but from what I understood it's all rendered inside a <canvas> element. So would it be possible to display the site inside an iframe with a z-index higher than the fullscreen canvas in

Change initial position and rotation of a model

杀马特。学长 韩版系。学妹 提交于 2020-06-17 13:09:09
问题 Got a simple .html file using A-Frame that loads a specific model. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Octant Cube - by Dodds, H. & Peres, T.</title> <meta name="description" content="Present in the Taxonomy article"> <script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script> </head> <body> <a-scene background="color: #FAFAFA"> <a-assets> <a-asset-item id="octant" src="octant.glb"></a-asset-item> </a-assets> <a-entity gltf-model="#octant"></a-entity> </body

Change initial position and rotation of a model

六眼飞鱼酱① 提交于 2020-06-17 13:06:29
问题 Got a simple .html file using A-Frame that loads a specific model. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Octant Cube - by Dodds, H. & Peres, T.</title> <meta name="description" content="Present in the Taxonomy article"> <script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script> </head> <body> <a-scene background="color: #FAFAFA"> <a-assets> <a-asset-item id="octant" src="octant.glb"></a-asset-item> </a-assets> <a-entity gltf-model="#octant"></a-entity> </body

aframe register componet add onclick attribute

不想你离开。 提交于 2020-05-17 08:49:58
问题 I want to create dynamic componet using aframe But I cannot add onclick on my component this my code AFRAME.registerComponent('cylinders', { init: function(){ let el = this.el; let sceneEl = document.getElementById('scene1'); let cyl = document.createElement('a-cylinder'); cyl.setAttribute('position', '0 0 0'); cyl.setAttribute('rotation', '0 0 0'); cyl.setAttribute('scale', '0 0 0'); cyl.setAttribute('radius', 1); cyl.setAttribute('height', 0.1); cyl.setAttribute('color', '#39BB82'); cyl

Detecting hovering on button event on Oculus Quest (Unity3D)

。_饼干妹妹 提交于 2020-03-23 07:57:10
问题 Stack: Oculus Quest Unity 2019.3 Oculus VR Integration macOS Catilina I have a Unity scene with a VR interface composed by a Canvas (World Space coordinates) and two buttons. The canvas has attached an OVR Raycaster objects which uses a laser pointer. Overall it works well, but when I try to intercept the event produced by hovering the laser pointer on the button, I can get only the click event. I'm using the following script (attached to the button): using System.Collections; using System