Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / VR :: The ultimate guide to Oculus input stuff!

Author
Message
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 21st Mar 2018 18:23
I have finally made some thorough testing of how Oculus Rift work with various AGKVR commands.
To approach this seriously, I wrote a program which displays all the AGKVR information I could find:



To use my program remember to click on its window to make it active, so it accepts keyboard input. Use the number keys to change what information is displayed:
1 :: Setup Commands
2 :: Player Commands
3 :: Controller Commands (Left)
4 :: Controller Commands (Right)
5 :: Chaperone commands
6 :: Device Info commands


Using the program above I got the following info for the Oculus Rift CV1. (I have no VIVE, so I can't test that. If anyone has VIVE and could check how it worked, it would be super helpful!)

LEFT TOUCH CONTROLLER:
---------------------------------------------------------------------------------------------

float AGKVR.LeftController_JoyX() // Left Touch Controller: Thumbstick X axis (-1.0 to +1.0)
float AGKVR.LeftController_JoyY() // Left Touch Controller: Thumbstick Y axis (-1.0 to +1.0)
float AGKVR.LeftController_Trigger() // Left Touch Controller: Trigger (0.0 to 1.0)
integer AGKVR.LeftController_Grip() // Left Touch Controller: Grip
integer AGKVR.LeftController_Button1() // Left Touch Controller: Button Y
integer AGKVR.LeftController_Button2() // Left Touch Controller: Button X or Thumbstick click
integer AGKVR.LeftController_GetFingerPointed() // Left Touch Controller: Not touching trigger
integer AGKVR.LeftController_GetThumbUp() // Left Touch Controller: Not touching Button Y, Button X or the thumbstick
float AGKVR.LeftController_AxisTriggerX(0) // Left Touch Controller: Thumbstick X axis (-1.0 to +1.0)
float AGKVR.LeftController_AxisTriggerX(1) // Left Touch Controller: Trigger (0.0 to 1.0)
float AGKVR.LeftController_AxisTriggerX(2) // Left Touch Controller: Grip (0.0 to 1.0)
float AGKVR.LeftController_AxisTriggerY(0) // Left Touch Controller: Thumbstick Y axis (-1.0 to +1.0)
integer AGKVR.LeftController_ButtonPressed(1) // Left Touch Controller: Button Y
integer AGKVR.LeftController_ButtonPressed(2) // Left Touch Controller: Grip
integer AGKVR.LeftController_ButtonPressed(7) // Left Touch Controller: Button X
integer AGKVR.LeftController_ButtonPressed(32) // Left Touch Controller: Thumbstick Click
integer AGKVR.LeftController_ButtonPressed(33) // Left Touch Controller: Trigger
integer AGKVR.LeftController_ButtonPressed(34) // Left Touch Controller: Grip

RIGHT TOUCH CONTROLLER:
---------------------------------------------------------------------------------------------

float AGKVR.RightController_JoyX() // Right Touch Controller: Thumbstick X axis (-1.0 to +1.0)
float AGKVR.RightController_JoyY() // Right Touch Controller: Thumbstick Y axis (-1.0 to +1.0)
float AGKVR.RightController_Trigger() // Right Touch Controller: Trigger (0.0 to 1.0)
integer AGKVR.RightController_Grip() // Right Touch Controller: Grip
integer AGKVR.RightController_Button1() // Right Touch Controller: Button B
integer AGKVR.RightController_Button2() // Right Touch Controller: Button A or Thumbstick click
integer AGKVR.RightController_GetFingerPointed() // Right Touch Controller: Not touching trigger
integer AGKVR.RightController_GetThumbUp() // Right Touch Controller: Not touching Button A, Button B or the thumbstick
float AGKVR.RightController_AxisTriggerX(0) // Right Touch Controller: Thumbstick X axis (-1.0 to +1.0)
float AGKVR.RightController_AxisTriggerX(1) // Right Touch Controller: Trigger (0.0 to 1.0)
float AGKVR.RightController_AxisTriggerX(2) // Right Touch Controller: Grip (0.0 to 1.0)
float AGKVR.RightController_AxisTriggerY(0) // Right Touch Controller: Thumbstick Y axis (-1.0 to +1.0)
integer AGKVR.RightController_ButtonPressed(1) // Right Touch Controller: Button B
integer AGKVR.RightController_ButtonPressed(2) // Right Touch Controller: Grip
integer AGKVR.RightController_ButtonPressed(7) // Right Touch Controller: Button A
integer AGKVR.RightController_ButtonPressed(32) // Right Touch Controller: Thumbstick Click
integer AGKVR.RightController_ButtonPressed(33) // Right Touch Controller: Trigger
integer AGKVR.RightController_ButtonPressed(34) // Right Touch Controller: Grip

DEVICE INFO:
---------------------------------------------------------------------------------------------

string AGKVR.HMD_GetModelNumber() // "Oculus Rift CV1"
string AGKVR.HMD_GetManufacturer() // "Oculus"
string AGKVR.RCntrl_GetModelNumber() // "Oculus Rift CV1 (Right Controller)"
string AGKVR.RCntrl_GetManufacturer() // "Oculus"
string AGKVR.LCntrl_GetModelNumber() // "Oculus Rift CV1 (Left Controller)"
string AGKVR.LCntrl_GetManufacturer() // "Oculus"




BTW, the following commands didn't work, so I skipped them:
AGKVR.HMD_GetTrackingSystem()
AGKVR.RCntrl_GetTrackingSystem()
AGKVR.LCntrl_GetTrackingSystem()
... Also, I noticed that the AGKVR documentation is missing AGKVR.Shutdown()
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 21st Mar 2018 23:33
Looks like some great info, wish i had an oculus to use it!
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 22nd Mar 2018 00:30
This is very useful thank you! I have yet to even test the VR functionality despite owning a Rift and buying the plugin it on launch day but will keep this reference handy.
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 22nd Mar 2018 11:24
VR worked fine for me, then suddenly stopped working, says the licence is no longer valid. Not quite sure what happened, but I had to remove it all. Worked well before that though.
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 25th Mar 2018 19:24
Having just gotten my Leap Motion thingie recently, I decided to opt-in to the Leap Motion newsletter. Got it in my mailbox yesterday and it just happens to mention AppGameKit!

Attachments

Login to view attachments
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 28th Mar 2018 14:19 Edited at: 28th Mar 2018 21:44
Since AppGameKit only has a single camera, the VR plugin recycles the main camera to render for both eyes. I have long had a suspicion that this caused the normal camera to misbehave. Now I have proof! In the code below, the plane should logically be placed exactly at the center of the screen. Yet it is offset slightly upwards and to the right. Comment away the VR code, and the plane hits center:



Also, it looks like the VR forces the camera to use its aspect ratio (The Oculus Rift uses two pairs of 1080:1200 screens)

EDIT: I said 1080:1200 was the aspect ratio forced upon the camera, but my experimentation shows something closer to 1080:1290
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 5th Apr 2018 22:51
Further nitpicking:

AGKVR saves renders each eye as a seperate image:



I got the clever idea of saving one of those images to the harddrive:



This saved me an image with the size of 1330 x 1584 pixels. This is strange, since the oculus should have 1080 x 1200 pixels for either eye. But it sorta fits the aspect ratio I had guessed at myself.

Damn ... I miss Ron!

Login to post a reply

Server time is: 2024-04-25 13:28:47
Your offset time is: 2024-04-25 13:28:47