Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
standtall007's avatar
11 years ago

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

2 Replies

Replies have been turned off for this discussion