Render mouse in VR?
I'm working on a VR game for the oculus rift, and i need the mouse cursor too be rendered ingame (Just like in 'I Expect you to die' but i simply can't figure out how to do it? Can i just enable the standard mouse, or do I have to project it on to a plane or something?
Answer by Echoshard1 · Sep 29, 2015 at 04:24 PM
Hey there,
I have been trying to do the same thing I had no luck getting the pointer however I was able to get a 3D object to do it correctly. It just needs some smoothing.
 using UnityEngine;
 using System.Collections;
 
 public class MouseViewPort : MonoBehaviour {
 
     public float ZValue = 5;
 
 
     void FixedUpdate()
     {
         Vector3 cursorPoint = new Vector3(Input.mousePosition.x, Input.mousePosition.y, ZValue);
         Vector3 cursorPosition = Camera.main.ScreenToWorldPoint(cursorPoint);
         transform.position = cursorPosition;
         transform.LookAt(Camera.main.transform);
     }
 }
Your answer
 
 
             Follow this Question
Related Questions
How to use a bluetooth mouse in Gear VR? 1 Answer
how to disable htc vive pro vr camera rotation and position ? 0 Answers
I want to make VR with Bolt. 0 Answers
GetDevicesWithCharacteristics not detecting anything 0 Answers
Play audio after enemy dies 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                