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

Fix issues when hand-tracking is disabled in project settings #199

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Aug 22, 2024

Currently, the hand-tracking and body-tracking samples are crashing with Godot v4.3-stable, because the hand-tracking project setting isn't enabled (it was enabled, but the default was changed just before Godot v4.3-stable, causing it to become disabled).

Godot PR godotengine/godot#95959 will fix the crash too, because it's caused by us calling OpenXRAPI::get_hand_tracker().

However, we really shouldn't even be trying to call it at all if the hand-tracking project setting is disabled! So, this PR checks the project setting (unfortunately, we can't check it early enough to prevent loading the extensions - this is due to a GDExtension limitation) and prevents the hand-tracking related extension wrappers from doing much if hand-tracking is disabled.

It also enables hand-tracking in the hand-tracking and body-tracking samples so that they actually work too :-)

@dsnopek dsnopek added the bug Something isn't working label Aug 22, 2024
@dsnopek dsnopek added this to the 3.0.1 milestone Aug 22, 2024
@dsnopek dsnopek requested review from m4gr3d and devloglogan August 22, 2024 19:17
Copy link
Member

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

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

LGTM

@BastiaanOlij
Copy link
Member

XR Meeting 23/8/24

Should be good to merge, this is something we need to keep in the back of our heads, never trust that things will be there because they can be disabled or fail to be created :)

Copy link
Collaborator

@devloglogan devloglogan left a comment

Choose a reason for hiding this comment

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

LGTM, built and tested the relevant samples and everything looks good there.

@m4gr3d m4gr3d merged commit 9ff21e6 into GodotVR:master Aug 25, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants