FirstPersonController/OVRplayercontroller
Hello,
I made a 3d labyrinth in Unity to measure the time that players need to finish it. For that I've made a script that shows a GUItext with the time spent on the task when the player controller goes through an invisible cube positioned at the end of the track. It worked fine, but when I started using oculus and changed the FirstPersonController for the OVRplayercontroller it stopped working. It is possibly a simple issue, but I'm truly lost on why it doesn't work if it worked with the other controller. I would be very thankful if someone could help me with this. This is the code:
#pragma strict
var tiempo:float;
var tiempoGUI:GUIText;
private var terminado:boolean = false;
function Start(){
Screen.lockCursor = true;
}
function OnTriggerEnter(obj:Collider){
terminado = true;
tiempoGUI.text = "Tiempo: " + tiempo.ToString();
}
function Update(){
if(!terminado){
tiempo += Time.deltaTime;
}
}
I made a 3d labyrinth in Unity to measure the time that players need to finish it. For that I've made a script that shows a GUItext with the time spent on the task when the player controller goes through an invisible cube positioned at the end of the track. It worked fine, but when I started using oculus and changed the FirstPersonController for the OVRplayercontroller it stopped working. It is possibly a simple issue, but I'm truly lost on why it doesn't work if it worked with the other controller. I would be very thankful if someone could help me with this. This is the code:
#pragma strict
var tiempo:float;
var tiempoGUI:GUIText;
private var terminado:boolean = false;
function Start(){
Screen.lockCursor = true;
}
function OnTriggerEnter(obj:Collider){
terminado = true;
tiempoGUI.text = "Tiempo: " + tiempo.ToString();
}
function Update(){
if(!terminado){
tiempo += Time.deltaTime;
}
}
