elvissteinjr / DesktopPlus

Advanced desktop access for OpenVR
GNU General Public License v3.0
454 stars 29 forks source link

Feature request: Center overlay when shown #44

Open Roliga opened 1 year ago

Roliga commented 1 year ago

It would be convenient to have a way to move an overlay in front of your view when you show it while still having it anchored to the world, similar to how the SteamVR dashboard is always in front of you when you open it.

I can think of two ways to do this:

  1. When an overlay is hidden, save its relative offsets to the viewport, then restore those offsets when it's shown again. XSOverlay does it this way and it works well. However if you hide and show your overlay regularly it's easy for its offset to accumulate, and you have to consiously tilt your head in such a way that it'll appear were you want it.
  2. Always place the overlay at a fixed (configurable?) offset from your viewport, like the SteamVR dashboard. I think this would feel more consistent and you'd be less prone to loosing an overlay behind you.

    This would be useful for quickly getting a glance at your desktop while in-game, where you may move around between hiding and showing your overlays. Also particularly useful if you lay down, or sit in a leaned back position, and want your desktop to appear within your field of view unlike the always vertical SteamVR dashboard.

elvissteinjr commented 1 year ago

Expanding positioning/origin options is planned, though I can't give an ETA on that (would be on the NewUI branch in any case). If understood this correctly, a way to integrate your suggestion would be something along the lines of not updating the position when the overlay is visible. i.e. HMD origin only updating on appearance of the overlay should satisfy your suggestion. Positions are already stored as offsets to origins and wouldn't change unless manually adjusted (this can be done fairly easily so I personally wouldn't opt into storing a new offset when hiding).

A constantly updating dashboard-like position origin is planned as well to cover those cases. What's possible right now in the current builds is to use the dashboard origin for this to some extent. Takes a opening the dashboard and closing it and restricts it the upright positioning of it, but otherwise provides an adjustable temporarily static overlay origin.

I'll leave this open until something has happened with it. Let me know if I got something wrong or you have more suggestions. Thanks!