W Key Press to VR Movement

Official forum for open source FreePIE discussion and development.
Post Reply
One Eyed Hopeful
Posts: 1
Joined: Mon Dec 11, 2017 11:42 pm

W Key Press to VR Movement

Post 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!

Cross Eyed!
Posts: 160
Joined: Mon Mar 02, 2015 3:58 pm

Re: W Key Press to VR Movement

Post 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.

Post Reply

Return to “FreePIE”