gusmanb / PSVRFramework

GNU Affero General Public License v3.0
194 stars 37 forks source link

Unity 3d axis control #30

Open OdinKong opened 7 years ago

OdinKong commented 7 years ago

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 commented 7 years ago

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.

lostedz commented 7 years ago

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

tcz001 commented 7 years ago

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

gusmanb commented 7 years ago

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.

OdinKong commented 7 years ago

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.

gusmanb commented 7 years ago

@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,

OdinKong commented 7 years ago

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.