dantman / elite-vr-cockpit

A SteamVR Overlay providing a virtual throttle and joystick and holographic buttons for ship functions, with custom integration into Elite Dangerous
Other
320 stars 36 forks source link

How hard is it to add custom overlays? #145

Open FeepingCreature opened 4 years ago

FeepingCreature commented 4 years ago

I have a trade route optimizer running locally with node. I want to trigger trade updates, trade calculation and display resulting flight instructions. Obviously this is out of scope for this app, but how practical would it be for me to patch in a custom window? (Presume programming knowledge but no specific experience with openvr.) Is there any documentation or guidance for this?

Alternately, is there any hope for official plugin support? Some less-involved-than-openvr way to project arbitrary geometry at a cockpit-specific location (and react to input events) would be amazing.

dantman commented 4 years ago

The OpenVR API docs are here: https://github.com/ValveSoftware/openvr/wiki/API-Documentation And the overlay API docs are here: https://github.com/ValveSoftware/openvr/wiki/IVROverlay_Overview

Honestly I use the API pretty directly, I don't really doo much on top of it. Creating an overlay in OpenVR is mostly a matter of setting the texture/width/position/etc which is pretty much the same thing you'd have to do if I were to create a plugin API. So right now there isn't much use.

I suppose in the future if I had specific examples I might consider it. If there was value to the panels being moved around with the same grab interface as the cockpit overlay. And if someone got me Oculus hardware and it turned out it was possible to create Oculus native APIs.

I would definitely want to talor this to examples. Because there are different input methods I might want to use depending on the type of panel (laser beam input, canvas based touch, collider based buttons). Also some laser input panels might be better using OVRToolkit.