diff --git a/plugin/src/main/cpp/export/pico_export_plugin.cpp b/plugin/src/main/cpp/export/pico_export_plugin.cpp index 429f6436..8c77c638 100644 --- a/plugin/src/main/cpp/export/pico_export_plugin.cpp +++ b/plugin/src/main/cpp/export/pico_export_plugin.cpp @@ -51,6 +51,16 @@ void PicoEditorPlugin::_exit_tree() { PicoEditorExportPlugin::PicoEditorExportPlugin() { set_vendor_name(PICO_VENDOR_NAME); + _face_tracking_option = _generate_export_option( + "pico_xr_features/face_tracking", + "", + Variant::Type::INT, + PROPERTY_HINT_ENUM, + "No,Face only,Lipsync only,Hybrid", + PROPERTY_USAGE_DEFAULT, + pico::FACE_TRACKING_NONE_VALUE, + false); + _eye_tracking_option = _generate_export_option( "pico_xr_features/eye_tracking", "", @@ -61,14 +71,14 @@ PicoEditorExportPlugin::PicoEditorExportPlugin() { pico::MANIFEST_FALSE_VALUE, false); - _face_tracking_option = _generate_export_option( - "pico_xr_features/face_tracking", + _hand_tracking_option = _generate_export_option( + "pico_xr_features/hand_tracking", "", Variant::Type::INT, PROPERTY_HINT_ENUM, - "No,Face only,Lipsync only,Hybrid", + "No,Low frequency,High frequency (60Hz)", PROPERTY_USAGE_DEFAULT, - pico::FACE_TRACKING_NONE_VALUE, + pico::HAND_TRACKING_NONE_VALUE, false); } @@ -83,6 +93,7 @@ TypedArray PicoEditorExportPlugin::_get_export_options(const Ref pico::HAND_TRACKING_NONE_VALUE) { + return "\"Hand tracking\" requires \"XR Mode\" to be \"OpenXR\".\n"; + } } return OpenXREditorExportPlugin::_get_export_option_warning(platform, option); @@ -175,5 +191,14 @@ String PicoEditorExportPlugin::_get_android_manifest_application_element_content contents += " \n"; } + //Hand tracking + int hand_tracking = _get_int_option("pico_xr_features/hand_tracking", pico::HAND_TRACKING_NONE_VALUE); + if (hand_tracking > pico::HAND_TRACKING_NONE_VALUE) { + contents += " \n"; + } + if (hand_tracking > pico::HAND_TRACKING_LOWFREQUENCY_VALUE) { + contents += " \n"; + } + return contents; } diff --git a/plugin/src/main/cpp/include/export/pico_export_plugin.h b/plugin/src/main/cpp/include/export/pico_export_plugin.h index fbf2c22f..bdc260ee 100644 --- a/plugin/src/main/cpp/include/export/pico_export_plugin.h +++ b/plugin/src/main/cpp/include/export/pico_export_plugin.h @@ -43,6 +43,10 @@ static const int FACE_TRACKING_NONE_VALUE = 0; static const int FACE_TRACKING_FACEONLY_VALUE = 1; static const int FACE_TRACKING_LIPSYNCONLY_VALUE = 2; static const int FACE_TRACKING_HYBRID_VALUE = 3; + +static const int HAND_TRACKING_NONE_VALUE = 0; +static const int HAND_TRACKING_LOWFREQUENCY_VALUE = 1; +static const int HAND_TRACKING_HIGHFREQUENCY_VALUE = 2; } //namespace pico class PicoEditorExportPlugin : public OpenXREditorExportPlugin { @@ -65,9 +69,11 @@ class PicoEditorExportPlugin : public OpenXREditorExportPlugin { Dictionary _eye_tracking_option; Dictionary _face_tracking_option; + Dictionary _hand_tracking_option; private: bool _is_eye_tracking_enabled() const; + bool _is_hand_tracking_enabled() const; }; class PicoEditorPlugin : public EditorPlugin {