Skip to content
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

Create staging and scene loading setup #169

Merged
merged 1 commit into from
Jul 31, 2022

Conversation

BastiaanOlij
Copy link
Member

@BastiaanOlij BastiaanOlij commented Jul 27, 2022

This introduces a staging and background loading setup for our demos.

At the core we have a new starting scene called staging.tscn which contains a loading screen and all the logic to load in supporting scenes.

Loading the scenes that form our actual levels/demos is now done using a background loader. While a scene is loading our loading screen is shown. Before we actually switch to our loaded scene the user is asked to hold the trigger button. We may make this an optional step that is only active if we detect the player isn't wearing their headset (yet) by checking the position of the HMD.

At startup we will default to loading res://scenes/main_menu/main_menu_level.tscn, this scene will allow us to load different parts of the demo.

Each scene that can be loaded should inherit from res://scenes/scene_base.tscn to ensure basic logic is in place.
These scenes can emit the following two signals:

  • exit_to_main_menu will return the user to the main menu level
  • load_scene(scene) will load the given scene and switch to it.

Note that our base scene has an ARVROrigin+ARVRCamera setup that can be further build out. The loading system already ensures that the main origin in the staging scene gets disabled.

Finally this PR introduces a new helper scene for XR tools called XRToolsHoldButton, this scene when enabled will detect the user pressing a given button on any controller and will emit a signal when the button is held for a preset amount of time after which the button disables itself.

@BastiaanOlij BastiaanOlij added the enhancement New feature or request label Jul 27, 2022
@BastiaanOlij BastiaanOlij added this to the 3.0.0 milestone Jul 27, 2022
@BastiaanOlij BastiaanOlij self-assigned this Jul 27, 2022
@BastiaanOlij BastiaanOlij force-pushed the create_staging_setup branch from fbfde7a to 6cbdf0e Compare July 28, 2022 15:47
Copy link
Collaborator

@Malcolmnixon Malcolmnixon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good and works fine!

@BastiaanOlij BastiaanOlij force-pushed the create_staging_setup branch from 6cbdf0e to dbd6f62 Compare July 31, 2022 04:45
@BastiaanOlij BastiaanOlij marked this pull request as ready for review July 31, 2022 04:53
@BastiaanOlij BastiaanOlij merged commit a33bd12 into GodotVR:master Jul 31, 2022
@BastiaanOlij BastiaanOlij deleted the create_staging_setup branch August 3, 2022 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants