Page 1 of 1

W Key Press to VR Movement

Posted: Fri Dec 15, 2017 9:41 am
by dinoman411
Hello I am new to FreePIE and could use some help.

I basically want a script that would allow me to move forward in a free locomotion VR game when W is pressed on the keyboard. So basically W = Forward on the Vive touchpad.

I have the Hydra drivers & SDK installed and showing up/starting up with SteamVR, however beyond that I'm stuck.

Any help would be greatly appreciated.

Thank You!

Re: W Key Press to VR Movement

Posted: Fri Dec 15, 2017 9:49 am
by Jabberwock
If the movement is mapped to the Vive touchpad (which in turn is mapped to the hydra's joystick), you could try:

Code: Select all

if keyboard.getKeyDown(Key.W):
     hydra[0].joyy = 1
Not that the treatment of the left and right controller is pretty inconsistent in SteamVR, so you could try also hydra[1]. And if you move backward instead of forward, change the value to -1.