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?
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);
}
}