10-17-2017 07:50 AM
void Update () {
if (OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger))
{
r1.material.color = Color.red;
}
if (OVRInput.GetUp(OVRInput.Button.PrimaryIndexTrigger))
{
r1.material.color = Color.white;
}
if (OVRInput.GetDown(OVRInput.Button.PrimaryTouchpad))
{
r2.material.color = Color.red;
}
if (OVRInput.GetUp(OVRInput.Button.PrimaryTouchpad))
{
r2.material.color = Color.white;
}
if (OVRInput.GetDown(OVRInput.Button.Back))
{
r3.material.color = Color.red;
}
if (OVRInput.GetUp(OVRInput.Button.Back))
{
r3.material.color = Color.white;
}
}
The Primary Touchpad and Back button work appropriately when the GetUp and GetDown functions are called, and GetDown works with the Trigger, but GetUp is just not working. I tried this same code in 2017.1 and it works fine.10-18-2017 01:46 PM
10-19-2017 10:26 PM
10-21-2017 04:40 AM
10-25-2017 04:16 PM
10-30-2017 08:30 PM
11-09-2017 12:53 AM
11-09-2017 06:38 PM
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ShowBackKeyStatus : MonoBehaviour {
public Text Status_DownUp;
public Text Status_Pressing;
public Text Status_Touchpad_Pressing;
// Use this for initialization
void Start ()
{
Status_DownUp.text = "Back key Released";
}
// Update is called once per frame
void Update ()
{
//In case of the below code, Back key is NOT work.
bool isPressBackKey = OVRInput.GetDown(OVRInput.Button.Back, OVRInput.Controller.LTrackedRemote) || OVRInput.GetDown(OVRInput.Button.Back, OVRInput.Controller.RTrackedRemote);
bool isReleaseBackKey = OVRInput.GetUp(OVRInput.Button.Back, OVRInput.Controller.LTrackedRemote) || OVRInput.GetDown(OVRInput.Button.Back, OVRInput.Controller.RTrackedRemote);
bool isPressingBackKey = OVRInput.Get(OVRInput.Button.Back, OVRInput.Controller.LTrackedRemote) || OVRInput.GetDown(OVRInput.Button.Back, OVRInput.Controller.RTrackedRemote);
//In case of the below code, Back key works
//bool isPressBackKey = OVRInput.GetDown(OVRInput.Button.Back, OVRInput.Controller.Active);
//bool isReleaseBackKey = OVRInput.GetUp(OVRInput.Button.Back, OVRInput.Controller.Active);
//bool isPressingBackKey = OVRInput.Get(OVRInput.Button.Back, OVRInput.Controller.Active);
//Touchpad is work even if it's same code with Back key.
bool isPressingTouchpad = OVRInput.Get(OVRInput.Button.PrimaryTouchpad, OVRInput.Controller.LTrackedRemote) || OVRInput.Get(OVRInput.Button.PrimaryTouchpad, OVRInput.Controller.RTrackedRemote);
if (isPressBackKey)
{
Status_DownUp.text = "Back key Pressed";
isReleaseBackKey = false;
}
else if(isReleaseBackKey)
{
Status_DownUp.text = "Back key Released";
isPressBackKey = false;
}
Status_Pressing.text = string.Format("Back key Pressing : {0}", isPressingBackKey.ToString());
Status_Touchpad_Pressing.text = string.Format("Touchpad Pressing : {0}", isPressingTouchpad.ToString());
}
}
11-11-2017 12:00 PM
11-12-2017 04:22 AM
imperativity said:
@80dots
We have an internal task open to fix this issue at this time. Thanks for the additional repro steps.