OpenVR-Advanced-Settings / OpenVR-AdvancedSettings

OpenVR Advanced Settings Dashboard Overlay
GNU General Public License v3.0
1.28k stars 130 forks source link

API for interacting with settings from other applications? (willing to help implement) #617

Open GotoFinal opened 1 year ago

GotoFinal commented 1 year ago

Is your feature request related to a problem? Please describe. Personally I want to be able to reset my playspace move drag automatically when something happens in game, but currently I don't see any way to interact with these settings from my own application.

Describe the solution you'd like I want some kind of API, could be actual dynamic library, could be OSC socket, could be named pipe, whatever you think will be a best solution, I'm not too experiance with C++ so I'm not sure whats the best solution to implement that will be easy to mantain.

Additional context As I'm said I'm not too experianced with C++, but as I need this feature for own project I'm willing to try to implement it after I get a green light that you are interested in having it and decide on best approach. Ofc more options could be expoed than just space drag.

ykeara commented 1 year ago

It's not a bad idea, and quite frankly is overall a good idea.

That being said what type of access speed are we talking like 1 call/s? 1 call/frame? 1 call/ms?

if in the calls/s range then I would honestly just save them as vr settings [i.e. through openvr](need to verify can drop custom settings, but believe this is possible)

That being said when we've talked about it before it's more as a way for other apps to be aware of space drag, i.e. so they manipulate their overlays with our offsets, or maybe simple interactions like disabling space drag etc.

Would like to better understand your use case, specifically what degree of interaction you are looking for

GotoFinal commented 1 year ago

@ykeara As I mentioned my exact case is to reset the placespace drag, and in more detial I want to automatically reset it when loading new world in game, so nothing requiring high access speeds. As I and few friends often have issues where due to high offset I accumulate by just using space drag feature I end up in some weird places/in walls etc.

As I'm a developer myself wanted to solve that issue by resetting playspace when I detect world change, but sadly having issues with that first part due to lack of any API for it (unless I missed it).

Not sure if thats part of any settings I can easly access, I've seen that the code for placespace reset does quite few things: https://github.com/OpenVR-Advanced-Settings/OpenVR-AdvancedSettings/blob/master/src/tabcontrollers/MoveCenterTabController.cpp#L979

So I'm fine with anything that can achieve that, but maybe there is more potential uses of implementing some kind of API.

TayouVR commented 1 year ago

I guess actually having a proper API could be useful for other apps like OVR Toolkit, Desktop+, XS Overlay to keep them relative to the user. (Simply the offset as Vector3 and Rotation as Quaternion or Vector3 for that use-case) Other things like toggling chaperone, pausing/playing media could be useful too, I could hook my own OSC app up to the media actions to trigger events in game. (OVR Toolkit currently sends OSC events for that, but only if media events are triggered through its UI, I generally manage media playback through OVRAS)

ZenithVal commented 1 year ago

Interested in this. I'd like a method for adjusting OVRAS' playspace offsets or even overriding m_velocity[(0,1, and 2] from MoveCenterTabController.cpp directly, as that would be even easier.

I'm working on a way to do player pickup in VRC with an OSC app. All I need is a way to move the player being picked up and playspace offsets would be perfect. I have a solid idea on getting SteamVR universe accurate direction from VRC.

Raphiiko commented 1 year ago

Am also interested in this. Specifically, I'm looking for a way to control OVRAS's brightness setting. Ideally this would support being set at least ~60 times a second, so smooth-ish transitions can be realised.