-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard Detecting and Auto Pause #114
base: Godot-3.x
Are you sure you want to change the base?
Conversation
Cool, this normally should be going through the notification system in Godot but I'm not sure if we can trigger that from the plugin. I know @m4gr3d implemented it for Quest but there we have a few more options because of the way Android is structured. Couple of things:
Thanks!! :) |
Regarding combining this in to OpenVRConfig, as that's currently only based on the reference type, it doesn't have a get_tree() method for the auto-pause functionality or even an automatically called _process() method so a consumer for this would need to write their own. I could strip back all that functionality and just implement it on the API consumer-side in the demo if you think that's a better idea for keeping the interface 'cleaner'. |
When a player invokes the SteamVR Dashboard (normally by pressing the System Button on a controller), they expect their game or VR application to pause any gameplay until they have finished performing whatever actions they needed (changing settings, checking another application using the desktop view, etc.) and closed the dashboard.
This patch adds an
OpenVRFocus
Node that can be added to a scene that does the following:dashboard_opened
anddashboard_closed
signalsUse Auto Pause
property. When enabled, automatically set the SceneTree to paused when the Dashboard is opened.Using the signals, the game could manually trigger its pause menu, perform an auto-save in case the player uses the dashboard to quit the game, or importantly, hide the player avatar while the dashboard is open to prevent visual depth confusion caused by the Dashboard overlay rendering visually further away but on top of the player's frozen avatar body.
If the Auto Pause function is enabled, the Node will set the SceneTree to paused when the dashboard is opened. It will not however automatically unpause as commonly players want manually unpause once they have closed the dashboard and reviewed themselves the state of the game. Games will need to provide their own un-pause function.
This patch uses a new node rather than amending the
OpenVRController
, because the Dashboard can be triggered by user actions other than the System button on their controllers, such as the System button on the HMD or an action in the desktop GUI for SteamVR.Demo
The demo has been modified to show hiding the player avatar when the dashboard is open, a manual pause on and off function has been added (Attached to
/actions/godot/in/button_ax
on the left hand), and the auto-pause when the dashboard opens is enabled. The cups, boxes and player hands have been set to stop when pause is enabled.