Search Unity

Move when I click the Touchpad

Discussion in 'VR' started by LeonServais, May 3, 2020.

  1. LeonServais

    LeonServais

    Joined:
    Apr 7, 2020
    Posts:
    6
    Hello!

    I'm searching for days for a solution to my problem. I'm trying to make a game where I simply move in the direction where I'm facing when the toucpad is pressed, like in the game "Affected the manor VR".
    I attached a script to my camera:
    Code (CSharp):
    1.  void Update()
    2.     {
    3.         if (Touchpad_IsClicked(0))
    4.         {
    5.             transform.position += transform.forward * Time.deltaTime * movementSpeed;
    6.         }
    7.  
    8.     }
    But unfortunately it doesn't work.




    Léon