Cant get input working.

Humphrey66Humphrey66 Posts: 1Member
I cant get my axis input working or any input for that matter I followed a video tutorial and it still didnt work heres my code:

using UnityEngine;
using System.Collections;

public class PlayerMouseLook : MonoBehaviour {
public float SensitivityX = 5.0f;
public float SensitivityY = 5.0f;
// Use this for initialization
void Awake () {
try{
OuyaSDK.registerInputAxisListener(new OuyaSDK.InputAxisListener<OuyaSDK.InputAxisEvent>()
{
onSuccess = (OuyaSDK.InputAxisEvent inputEvent) =>
{
OuyaInputManager.HandleAxisEvent(inputEvent);
},
onFailure = (int errorCode, string errorMessage) =>
{
//FAIL
}
});
}
catch(System.Exception ex){
//FAIL
}
}
// Update is called once per frame
void Update () {
Vector3 TempRotation = transform.localEulerAngles;
float rotateX = OuyaInputManager.GetAxis("RX", OuyaSDK.OuyaPlayer.player1);
float rotateY = OuyaInputManager.GetAxis("RL", OuyaSDK.OuyaPlayer.player1);
TempRotation.y += rotateX;
TempRotation.x += -rotateY;
transform.localEulerAngles = TempRotation;
}
}

i've used unity for years and was excited when I heard about the ouya and how you would b able to make games with it so this problem is a little frustrating. there is no errors in unity it just doesnt work when I run it on the ouya.

Comments

Sign In or Register to comment.