0

I have written a small script with the aim of getting my Oculus Go controller to move an object forwards, backwards, left and right. I have attached a screen grab. I've also set up the unity input manager to link to it. This does not seem to work however.

Code screen shot

screen shot

Settings screen shot

Settings screen shot

void Update()
{

    transform.Translate(Input.GetAxis("Oculus_GearVR_LThumbstickX") * Vector3.left * Time.deltaTime * 5);
    transform.Translate(Input.GetAxis("Oculus_GearVR_LThumbstickY") * Vector3.up * Time.deltaTime * 5);

    transform.Translate(Input.GetAxis("Oculus_GearVR_LThumbstickX") * Vector3.right * Time.deltaTime * 5);
    transform.Translate(Input.GetAxis("Oculus_GearVR_LThumbstickY") * Vector3.down * Time.deltaTime * 5);

}
Sham Dhiman
  • 1,348
  • 1
  • 21
  • 59
jono
  • 35
  • 8
  • 1
    It's far better to include code as actual text rather a screenshot, for all sorts of reasons, but particularly to allow people to copy / paste it to run it themselves or edit it to include in an answer, and also to allow screenreaders to read it – Diado Dec 20 '18 at 12:42
  • Don't put image of your code, instead copy/paste the code in your question and format it, it will be easier to help you after :) – Antoine Thiry Dec 20 '18 at 12:42

0 Answers0