Skip to main content
Up and Coming
July 4, 2014

Is there an "Axis" that head tracking is responding to?

I mean like "Mouse X" Axis that comes with any new Unity Project??? It's because i have made a little script that makes the player character move in the direction the player camera looks at... it may sound a little confusing but i am very tired and i am honestly trying my best :) but is it possible to make the character move in the direction the camera looks at using the native OVR scripts that come with the SDK? Thanks in advance :)

Cheers.

P.S: i forgot to write the code :P
	public Transform target;
public float inputRotationSpeed = 100f;

void Update ()
{
float axisX = Input.GetAxis ("Mouse X") * inputRotationSpeed * Time.deltaTime;
target.Rotate (Vector3.up, axisX);
}
    This topic has been closed for replies.

    2 replies

    Up and Coming
    July 4, 2014
    there is. You have to use GetOrientation or GetPredictedOrintation in 0.25 or GetCameraPositionOrientation in 0.32

    http://docs.ros.org/hydro/api/oculus_sdk/html/classOVR_1_1SensorFusion.html
    Up and Coming
    July 4, 2014
    Thank you very much for your help molton :) i kinda figured out that there had to be more than just what i have written ;) But thanks very much ;)

    Cheers.

    EDIT. I accidentally wrote milton instead of molton, that is because of the stupid mac i'm using with the text completion or whatever it's called :P
    ASUS Maximus VII Formula Intel core i7 quad core 4790K OC'ed @ 4.4Ghz 32GB DDR3 Ram Nvidia Geforce GTX 980 4GB Windows 10 Pro 64bit GSync Monitor @ 2560x1440, 144Hz ------------------------------------------- DK2 Owner CV1 Preordered.