Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
That project looks very interesting. I'll give it a try today! After posting last night, I found HeadlessOverlayToolkit[github.com], from the same user, but I had some troubles getting it going, so I'll have a try with both of these today.
A couple of hours later he's added support for 3rd and 4th controllers to the Beta branch of HeadlessOverlayToolkit[github.com].
Thanks Hotrian :)
Something I had to do to get the transformation matrix from OpenVR to work properly in Unity was to reverse rotation on the X-axis and position on the Z-axis. I'm pretty sure it could be done differently with the result of a different forward direction, but this is what I ended up with for it to look correct.
Anyway, sorry for resurrecting the thread, I just found it funny that when I searched before I started working on this today, this thread which I had participated in was the top Google result, so I figured I could just as well reply after my happily successful experimentation!
My current unity project uses the integrated XR API with OpenVR to access my VIVE.
In the past, I created a c++/qt app + OpenVR API to capture and render to the VIVE.
However, I do not know how to do the OpenVR init myself within Unity, because it does everything under the hood automatically.
If I cant make this work, the alternative were to capture the tracking in a standalone app and design a interface/plugin for the unity project maybe?
# First I unload the Unity OpenVR package, because I'm not certain what revision of OpenVR it uses and there's only the .dll, I couldn't find a readable header file to it. Did a dump of the lib - it seems as if no modification to the available methods were made though.
Means Unity's own XR implementation is disabled and its methods can not be used.
# Downloaded the built OpenVR API with supplied C# header from the official git repository. The binary itself is compiled in c++ and it exports some interface functions for Win, Linux, Mac. The repo also has some demo samples to look at.
# Took a short crashcourse about .NET CLI and marshalling "C" code from c#
# Put the binary into Assets/Plugins/x86_64 and the .cs header in Assets/Scripts of my Unity project. That was everything required to start using it in scripts. It just worked. No assembly referencing, static libs or including sorts of required. Magic O.O
# I did some minor convinience modifications to the .cs header (Usually thats a bad idea for future updates, I know). Basically I split the file and namespace plus moved some platform specific method arguments out of the wrapper class methods. Also the shorthand 'IVRSystem System' was renamed to resolve namespace conflict with .Net System
# The final script then includes the static wrapper class 'OpenVR' by 'using Valve.VR;' and accesses the VR device by the property OpenVR.Sys
# Ofc the initialization has to be done as mentioned already, have SteamVR running, then call OpenVR.Init with the Application Background argument. The wrapper class manages the fetching of the interface and instantiation as a singleton.