Forum Discussion

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

How to debug C# script when using the touch controllers and the headset

Hi,

 

I am new to Oculus Quest 2, I made a sample project and I wrote some simple C# scripts for the inputs from touch controllers. I used Unity 3d editor and Visual Studio for C# scripts. The C# scripts I want to test are like the following:

 

if (Input.touchCount > 0 &&
Input.GetTouch(0).phase == TouchPhase.Moved)
{


var touchDeltaPosition:Vector2 = Input.GetTouch(0).deltaPosition;

Vector3 movement = new Vector3(touchDeltaPosition.x, 0.0f, touchDeltaPosition.y);

 

rb.AddForce(movement * speed * Time.deltaTime);
}

 

I want to see if I move the touch controllers how the codes above behave, basically I want to debug with the actual devices. Is there a tutorial about this?  Thank you in advance

No RepliesBe the first to reply