FreePIE for PSVR - Trinus Virtual Reality

FreePIE for PSVR

Trinus PSVR can take FreePIE input data and use it for head positioning and/or left and right VR controllers. To do so, it reads from FreePIE IO, an array of up to 4 elements (from 0 to 3) containing xyz and yawpitchroll data.

While FPIO[0-2] can be used for head and controllers rotation and position, FPIO[3] is used for button mapping. FPIO[3].y and z are read as 8 bits to indicate the state of a button press on the left and right controllers, respectively.

These buttons can be mapped within Trinus PSVR (Advanced tab) to different SteamVR buttons, including the touch controller (acting as a directional pad).

While the input data can come from any FreePIE IO compatible device (or a script, using the FreePIE application), the mapping is designed with PSMove controllers in mind. This is why the input buttons are named as the buttons present on those controllers. The 8 bits are assigned (low to high bit) as square, triangle, cross, circle, move button, PS button, start and select.

FPIO[3].pitch and roll are read as left and right triggers, respectively.

To use the mapping in combination with PSMove controllers, you will need the following software:

If not using PSMove, you can create a FreePIE script to convert data from another source (keyboard and mouse, for example). See below an sample script for left controller:

 if starting:
     x = 0
     y = 0
     z = 0
 t = 0
 b = 0
 if keyboard.getPressed(Key.A):
     x += 0.1
 if keyboard.getPressed(Key.D):
     x -= 0.1
 if keyboard.getPressed(Key.R):
     y += 0.1
 if keyboard.getPressed(Key.F):
     y -= 0.1
 if keyboard.getPressed(Key.W):
     z += 0.1
 if keyboard.getPressed(Key.S):
     z -= 0.1
 if keyboard.getKeyDown(Key.D2):
     t = 1
 if keyboard.getKeyDown(Key.D3):
     b = 1
 if keyboard.getKeyDown(Key.D4):
     b = 2
 if keyboard.getKeyDown(Key.D5):
     b = 4
 if keyboard.getKeyDown(Key.D6):
     b = 8
 if keyboard.getKeyDown(Key.D7):
     b = 16
 if keyboard.getKeyDown(Key.D8):
     b = 32
 if keyboard.getKeyDown(Key.D9):
     b = 64
 if keyboard.getKeyDown(Key.D0):
     b = 128
 freePieIO[1].x = x
 freePieIO[1].y = y
 freePieIO[1].z = z
 freePieIO[3].y = b
 freePieIO[3].pitch = t