Forum Discussion
Neith
12 years agoHonored Guest
RiftDotNet exception
I'm using the RiftDotNet libraries and the code from this tutorial: http://visualstudiomagazine.com/articles/2013/12/02/building-a-virtual-reality-game-part-2.aspx
(It's for an old XNA project, not MonoGame.)
But I'm getting a TypeInitializationExeption "The type initializer for 'RiftDotNet.Factory' threw an exception." when the new HMDManager() is created in Initialize().
Is anyone else having this problem, or using RiftDotNet and got it working?
(It's for an old XNA project, not MonoGame.)
But I'm getting a TypeInitializationExeption "The type initializer for 'RiftDotNet.Factory' threw an exception." when the new HMDManager() is created in Initialize().
Is anyone else having this problem, or using RiftDotNet and got it working?
15 Replies
- ShadowLinkExplorerI've implemented the lib yesterday and didn't have any problems. Just added the dll as a reference and copied the other dll in the same folder as the build.
Can you try this code and see if you get any values back?using RiftSharp;
//.....
YawPitchRoll ypr = Hmd.Instance.YawPitchRoll;
float yaw=ypr.Yaw;
Source
Edit: Nevermind just noticed that I was using the other lib. (facepalm) - LJFireHonored GuestHey Neith,
I'm having the same problems. Also my riftdotnet isn't picking up the yaw readings, there's..something but it doesn't change when i change yaw, roll and pitch are ok. Btw does RDN include drift correction? The readouts seem to be drifting the more i rotate..
I'm kind of new at this. - VogelvisionHonored GuestThe RiftDotNet DLL in the article is setup to use .NET Framework 4.5.
- BorstenhorstHonored GuestFacing the same problem with the yaw.
Yes its .Net 4.5, do you think this might be the problem?? - VogelvisionHonored GuestIn the VrDevice class file add _hmd.YawCorrection = true; to the Initialize method prior to the _hmd.Reset(); call. You'll get an error currently if you're not using .NET 4.5 as it won't be able to call the native code correctly.
- BorstenhorstHonored Guestok...
I realized that the version I used is different from the one on the second part of the demo which is the version you are talking about.
If I include the .dlls from the demo part2 it crashed telling me that RiftDotNet.Factory failed opening the RiftDotNet.Win32/x64.dll. The file is in the build folder but I cant figure out where the problem is.
I then tried to compile them by myself but honestly... this was a bit too much for me :D There are problems with absolute pathes in the project, I guess another SDK version etc. and as I said, a bit too much for me to figure out how to make it work
I would be so happy if someone could tell me how to generate those .dlls or could post/send them. - pmarquesHonored GuestAfter trying and failing with that same tutorial and dll's, I finally got it right thanks to this code sample:
http://bettercoderwannabe.blogspot.ch/2013/08/oculus-ar-drone-and-kinect-completed.html
Now the only thing missing is a XNA shader with chromatic aberration.. - BorstenhorstHonored Guestthanks for the link but the problem with this lib is that it is just providing the axis and nothing else. So its basically the same like riftsharp which is also easy to set up. I wanted to use riftdotnet because it is full blown with a lot of nice features like events etc.
- pmarquesHonored Guest
"Borstenhorst" wrote:
the problem with this lib is that it is just providing the axis and nothing else. So its basically the same like riftsharp which is also easy to set up.
No, the code sample in the link I provided gives you access to everything but chromatic aberration correction. Our fellow rifter used only what he needed, but the OculusRift project is an almost complete wrapper to OculusPlugin.dll. You may have to create some methods and glue code that the sample author didn't need, but it's all there except for chromatic aberration.
I can share the code with my alterations and create a simple tutorial, if there is interest. - BorstenhorstHonored GuestSure.
I would be interested and I am very sure there will be a lot of other guys interested in a nice tutorial.
Also I have seen that you can orientate at the VR Player, they do have very nice ideas in there:
http://vrplayer.codeplex.com/
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 6 months ago
- 12 years ago
- 5 years ago