-
Notifications
You must be signed in to change notification settings - Fork 26
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
[DRAFT] Support making hybrid apps for Pico headsets #246
base: master
Are you sure you want to change the base?
Conversation
@@ -59,9 +59,10 @@ func _process(_delta: float) -> void: | |||
panel_switcher_layer.update_pointer(t.origin, -t.basis.z, pointer_pressed) | |||
|
|||
func _on_right_controller_pointer_button_pressed(p_name: String) -> void: | |||
if p_name == 'trigger_click': | |||
print("button: ", p_name) | |||
if p_name == 'trigger_click' or p_name == 'select_button': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what's going on with this. I took a quick peek at the action map, and it seemed like I should be getting "trigger_click" for Pico 4 controllers, but instead I'm getting "select_button". Needs to be investigated more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be related to the issue mentioned in RC, where Pico defaults to a compat mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I think it's the same thing, but I haven't had a chance to investigate further yet.
But we'll definitely want to have the action map working correctly before taking this out of draft.
f09e254
to
5d00ef4
Compare
5d00ef4
to
bb96d69
Compare
Rebased now that PR #245 has been merged The diff is really quite small now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@@ -200,5 +205,25 @@ String PicoEditorExportPlugin::_get_android_manifest_application_element_content | |||
contents += " <meta-data tools:node=\"replace\" android:name=\"Hand_Tracking_HighFrequency\" android:value=\"1\" />\n"; | |||
} | |||
|
|||
HybridType hybrid_type = _get_hybrid_app_setting_value(); | |||
if (hybrid_type != HYBRID_TYPE_DISABLED) { | |||
contents += " <meta-data tools:node=\"replace\" android:name=\"pvr.app.type\" android:value=\"2d\" />\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious about this meta-data.. should its value be vr
when we set the immersive activity as the default launcher?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might just control where the app is sorted in the library in headset. I need to experiment with that a bit.
But if that is correct, then, yeah, perhaps we should only set it when we start as panel, with the idea that the app is primarily a panel app.
@@ -245,3 +245,252 @@ pico_xr_features/face_tracking=0 | |||
pico_xr_features/hand_tracking=0 | |||
xr_features/enable_magicleap_plugin=false | |||
magicleap_xr_features/hand_tracking=0 | |||
pico_xr_features/hybrid_app=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover from previous logic
@@ -59,9 +59,10 @@ func _process(_delta: float) -> void: | |||
panel_switcher_layer.update_pointer(t.origin, -t.basis.z, pointer_pressed) | |||
|
|||
func _on_right_controller_pointer_button_pressed(p_name: String) -> void: | |||
if p_name == 'trigger_click': | |||
print("button: ", p_name) | |||
if p_name == 'trigger_click' or p_name == 'select_button': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be related to the issue mentioned in RC, where Pico defaults to a compat mode?
This builds on PR #245 to attempt to add hybrid app support for Pico headsets as well.
It almost works!
Switching from immersive to panel works fine. Switching from immersive to panel works-ish, but the panel is minimized, and you have to click it on the toolbar again for it to appear, but it will appear in a panel.
Marking as DRAFT until we can get it working a little better.