PSVRFramework icon indicating copy to clipboard operation
PSVRFramework copied to clipboard

Unity 3d axis control

Open OdinKong opened this issue 8 years ago • 7 comments

Hey guys I absolutely love that your helping to get this thing working for PC. I was able to go to VR mode successfully but when i click vr with head tracking it just endlessly displays the buffering symbol. Do I need to plug in the camera? How would I go about assigning controls to the axis of the headset in order to have it control and in game camera. Do the axis have names or are they replacing the mouse axis?

OdinKong avatar Nov 11 '16 09:11 OdinKong

Sorry I've read some more of your posts and I'm now seeing that you are working on an algorithm to combine acceleration with the yaw pitch and tilt data. How is that going? Also do you think its possible to have it feed into unity some how? I would love to try and help you figure that out but I'm not sure how to access the raw data from the headset in unity.

OdinKong avatar Nov 11 '16 10:11 OdinKong

ye i'm also interested how to use the actual sensor data and connect it to unity for app/game developing.

lostedz avatar Nov 12 '16 23:11 lostedz

It's possible if we can find enough API to implement a openvr interface, I can work on this once my headset arrives

tcz001 avatar Nov 23 '16 12:11 tcz001

I've been silent about this because I was having some troubles, but now all are corrected, I got the right integration and calibration phase. The new PSVRToolbox is broadcasting a quaternion on the PSVR report besides the sensor readings with the headset orientation, so integrating this will be just a matter of adding an UDPListener and use the quaternion to orientate the camera.

Any help with this will be grateful, I don't use Unity, I like to program raw OpenGL, so it's very probable my world setup differs from the one Unity creates. If someone is willing to test this and help just name it and I will create a package with the new toolbox and instructions on how to use.

Also, any thoughts are welcome, maybe we can create just a broadcast specific for games with only the quaternion orientation, gyro, accelerometer and button values with a lower speed rate (PSVR reports come at 0.005ms, too much for a game).

Other possibility is to create an OpenVR broadcaster, that was one of my goals, as now we have the pose we can convert these to euler angles and broadcast the for OpenVR.

gusmanb avatar Nov 23 '16 14:11 gusmanb

I would love to help you test it. I can absolutely check if any of the axis are tied to the head tracking in unity. The only problem is that when I turn on vr with head tracking i just see the buffering symbol. I'm not sure how to get around this. stereoscopic with no tracking works fine.

OdinKong avatar Nov 24 '16 08:11 OdinKong

@OdinKong Don't use that function, it's only to enable the head tracking lights. There's no published toolbox with the aforementioned change, I will create a test package this weekend, I'm on the middle of a very big restructuration as I'm trying to create a SteamVR driver and need to change how things are arranged.

I will update this issue when the test toolbox is available,

gusmanb avatar Nov 24 '16 10:11 gusmanb

Ok great! I'm sure if it works with steam vr then it will also work with unity. I will do plenty of testing as soon as your done. Good luck sire.

OdinKong avatar Nov 25 '16 20:11 OdinKong