{"version":"1.0","provider_name":"Geckode!","provider_url":"https:\/\/www.youbiquo.eu\/geckode","author_name":"Aida Garfami","author_url":"https:\/\/www.youbiquo.eu\/geckode\/author\/aida-garfami\/","title":"Interaction Package Guides - Geckode!","type":"rich","width":600,"height":338,"html":"<blockquote class=\"wp-embedded-content\" data-secret=\"r9rdNNMiUm\"><a href=\"https:\/\/www.youbiquo.eu\/geckode\/en\/interaction-package-guides\/\">Interaction Package Guides<\/a><\/blockquote><iframe sandbox=\"allow-scripts\" security=\"restricted\" src=\"https:\/\/www.youbiquo.eu\/geckode\/en\/interaction-package-guides\/embed\/#?secret=r9rdNNMiUm\" width=\"600\" height=\"338\" title=\"&#8220;Interaction Package Guides&#8221; &#8212; Geckode!\" data-secret=\"r9rdNNMiUm\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" class=\"wp-embedded-content\"><\/iframe><script>\n\/*! This file is auto-generated *\/\n!function(d,l){\"use strict\";l.querySelector&&d.addEventListener&&\"undefined\"!=typeof URL&&(d.wp=d.wp||{},d.wp.receiveEmbedMessage||(d.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&&!\/[^a-zA-Z0-9]\/.test(t.secret)){for(var s,r,n,a=l.querySelectorAll('iframe[data-secret=\"'+t.secret+'\"]'),o=l.querySelectorAll('blockquote[data-secret=\"'+t.secret+'\"]'),c=new RegExp(\"^https?:$\",\"i\"),i=0;i<o.length;i++)o[i].style.display=\"none\";for(i=0;i<a.length;i++)s=a[i],e.source===s.contentWindow&&(s.removeAttribute(\"style\"),\"height\"===t.message?(1e3<(r=parseInt(t.value,10))?r=1e3:~~r<200&&(r=200),s.height=r):\"link\"===t.message&&(r=new URL(s.getAttribute(\"src\")),n=new URL(t.value),c.test(n.protocol))&&n.host===r.host&&l.activeElement===s&&(d.top.location.href=t.value))}},d.addEventListener(\"message\",d.wp.receiveEmbedMessage,!1),l.addEventListener(\"DOMContentLoaded\",function(){for(var e,t,s=l.querySelectorAll(\"iframe.wp-embedded-content\"),r=0;r<s.length;r++)(t=(e=s[r]).getAttribute(\"data-secret\"))||(t=Math.random().toString(36).substring(2,12),e.src+=\"#?secret=\"+t,e.setAttribute(\"data-secret\",t)),e.contentWindow.postMessage({message:\"ready\",secret:t},\"*\")},!1)))}(window,document);\n\/\/# sourceURL=https:\/\/www.youbiquo.eu\/geckode\/wp-includes\/js\/wp-embed.min.js\n<\/script>\n","description":"Interaction Package Guide Interaction Package Guide \u2014 LeonardoXR SDK Interaction Package Guides Version 1.0.2 Device: Youbiquo Leonardo XR Base SDK: Snapdragon Spaces 1.0.4 This guide describes how to configure the interaction layer for LeonardoXR applications using standard Unity packages: XR Interaction Toolkit (XRIT) 3.3.0\u00a0\u2014 high-level interaction system for controllers, ray interactors and direct interactors. XR Hands 1.7.2\u00a0\u2014 access to hand joint data and gesture recognition. Dependencies and Versions Package Version Source XR Interaction Toolkit 3.3.0 Unity Registry XR Hands 1.7.2 Unity Registry AR Foundation 6.2.1 Unity Registry Snapdragon Spaces SDK 1.0.4 Tarball (Qualcomm) LeonardoXR SDK 1.0.2 Tarball (Youbiquo) UniTask 2.5.10 Unity Registry NOTE\u00a0All dependencies must be installed as described in the Getting Started guide before proceeding with interaction configuration. 1. XR Interaction Toolkit Configuration Installation Install via\u00a0Window &gt; Package Manager &gt; Unity Registry &gt; XR Interaction Toolkit &gt; Install\u00a0(version 3.3.0). If prompted &#8220;Enable the new input system?&#8221;, click\u00a0Yes. If prompted &#8220;XR Interaction Layer Mask Update Required&#8221;, click\u00a0I Made a Backup, Go Ahead!\u00a0(for new projects) or\u00a0No Thanks\u00a0if no previous XRIT version was present. Import Starter Assets Open\u00a0Window &gt; Package Manager, select\u00a0In Project\u00a0then\u00a0XR Interaction Toolkit. Under\u00a0Samples, click\u00a0Import\u00a0on\u00a0Starter Assets. Also click\u00a0Import\u00a0on\u00a0Hand Interaction Demo\u00a0(required for hand tracking samples). The Starter Assets include: Pre-configured Input Action Asset for XR controllers and hands. Reference prefabs for XR Origin with Ray Interactor and Direct Interactor. Base materials and shaders for interaction visual feedback. Configure Input Actions After import, an\u00a0XRI Default Input Actions\u00a0asset is added to\u00a0Assets\/Samples\/XR Interaction Toolkit\/[version]\/Starter Assets\/. This asset is pre-configured for standard controller profiles (including the Companion Controller via Microsoft MMRC Profile) and for hands. To associate the asset with the system: go to\u00a0Edit &gt; Project Settings &gt; XR Plug-in Management &gt; Input System\u00a0and ensure\u00a0Active Input Handling\u00a0is set to\u00a0Both\u00a0or\u00a0Input System Package (New). 2. Scene Configuration \u2014 XR Origin Base Scene Hierarchy AR Session XR Origin (Action-based) \u2514\u2500\u2500 Camera Offset \u251c\u2500\u2500 Main Camera (tagged \"MainCamera\") \u251c\u2500\u2500 LeftHand Controller \u2502 \u251c\u2500\u2500 XR Ray Interactor (left) \u2502 \u2514\u2500\u2500 XR Direct Interactor (left) \u2514\u2500\u2500 RightHand Controller \u251c\u2500\u2500 XR Ray Interactor (right) \u2514\u2500\u2500 XR Direct Interactor (right) Create the base structure by selecting\u00a0GameObject &gt; XR &gt; XR Origin (Action-based). NOTE\u00a0Disable\u00a0AR Camera Background\u00a0\u2014 not supported on LeonardoXR and automatically disabled at runtime. Also disable\u00a0AR Camera Manager\u00a0if not retrieving RGB frames from the camera. Input Action Manager Add the\u00a0Input Action Manager\u00a0component to the XR Origin (or a persistent GameObject). In the\u00a0Action Assets\u00a0field, assign: XR Input Actions\u00a0(from\u00a0Samples\/LeonardoXR SDK\/[version]\/Core Samples\/Shared Assets). 3. XR Hands Configuration Installation Install via\u00a0Window &gt; Package Manager &gt; Unity Registry &gt; XR Hands &gt; Install\u00a0(version 1.7.2). Import Hand Samples Open\u00a0Window &gt; Package Manager &gt; In Project &gt; XR Hands &gt; Samples\u00a0and import: Gestures\u00a0\u2014 gesture recognition system. Hand Visualizer\u00a0\u2014 hand mesh visualisation. Enable Hand Tracking Subsystem Go to\u00a0Edit &gt; Project Settings &gt; XR Plug-in Management &gt; OpenXR\u00a0(Android tab). Under\u00a0All Features, enable\u00a0Hand Tracking Subsystem. Also enable\u00a0Hand Tracking\u00a0in the Snapdragon Spaces feature group. NOTE\u00a0The Hand Tracking Subsystem must be enabled in\u00a0All Features\u00a0\u2014 not just in the Snapdragon Spaces section \u2014 to work correctly on LeonardoXR. Hand Data Access via XR Hands API using UnityEngine.XR.Hands; XRHandSubsystem handSubsystem = XRHandSubsystemUtility.GetSubsystem(); if (handSubsystem != null) { XRHand leftHand = handSubsystem.leftHand; if (leftHand.isTracked) { if (leftHand.GetJoint(XRHandJointID.IndexTip).TryGetPose(out Pose indexTipPose)) { \/\/ indexTipPose.position = position of left index fingertip } } } Gesture Recognition [SerializeField] XRHandGestures gestures; void OnEnable() { gestures.gesturePerformed += OnGesturePerformed; } void OnGesturePerformed(XRHandGesture gesture, Handedness handedness) { Debug.Log($\"Gesture: {gesture.gestureName} performed with {handedness}\"); } 4. Configuring Interactables Adding an Interactable to an Object Add a\u00a0Collider\u00a0to the object (e.g. Box Collider). Add\u00a0XR Grab Interactable\u00a0for grabbable objects, or\u00a0XR Simple Interactable\u00a0for objects that receive events without being moved. public class MyButton : MonoBehaviour { [SerializeField] XRSimpleInteractable interactable; void OnEnable() { interactable.selectEntered.AddListener(OnSelected); } void OnSelected(SelectEnterEventArgs args) { Debug.Log(\"Selected by: \" + args.interactorObject); } } Interaction Layer Mask XRIT 3.x uses\u00a0Interaction Layer Masks\u00a0to filter which interactors can interact with which interactables: interactable.interactionLayers = InteractionLayerMask.GetMask(\"Default\", \"UI\"); 5. UI Canvas and Interaction World Space Canvas Create a\u00a0Canvas\u00a0and set\u00a0Render Mode\u00a0to\u00a0World Space. Add the\u00a0Tracked Device Graphic Raycaster\u00a0component to the Canvas (replaces the standard Graphic Raycaster). Add\u00a0XR UI Input Module\u00a0to the EventSystem GameObject in the scene (replaces the default Input System UI Input Module). Recommended Canvas Settings Parameter Recommended Value Render Mode World Space Dynamic Pixels Per Unit 1 Reference Pixels Per Unit 100 Scale 0.001 (for a ~1m canvas = 1000 pixel units) 6. Combining Controller and Hand Tracking On LeonardoXR it is not possible to simultaneously use headset Controllers and full Hand Tracking (with raycast from both hands) due to conflicts between OpenXR profiles. Option A \u2014 Controller Only (Companion Controller) Add\u00a0Microsoft MMRC Profile\u00a0to enabled profiles. Do not add Hand Interaction Profile. The Companion Controller handles pointing; hands can be used as colliders but not as raycast interactors. Option B \u2014 Hands Only (Dual Hand Mode) Add\u00a0Hand Interaction Profile\u00a0to enabled profiles. Do not add Microsoft MMRC Profile. Remove the Device Pointer Prefab from the Controller. Both hands tracked as full interactors; no phone input. Option C \u2014 Controller + One Hand Add\u00a0Microsoft MMRC Profile\u00a0to enabled profiles. Keep only the Right Hand Controller active in the XR Origin. The left hand can still function as a collider and poke interaction trigger, but not as a ray interactor. 7. UniTask \u2014 Asynchronous Operations UniTask 2.5.10 is included as a dependency for high-performance async operations (asset loading, waiting for subsystems, etc.) without GC allocations. using Cysharp.Threading.Tasks; public class HandSubsystemWaiter : MonoBehaviour { async UniTaskVoid Start() { \/\/ Wait until the XR Hands subsystem is ready await UniTask.WaitUntil(() =&gt; XRHandSubsystemUtility.GetSubsystem()?.running ?? false); Debug.Log(\"XR Hands subsystem ready.\"); } } UniTask is used internally by the LeonardoXR SDK for asynchronous operations. It is recommended to use it in application code as well for consistency with the SDK lifecycle. OpenXR Interaction Profile Reference Profile Use Microsoft Mixed Reality Motion Controller Profile Physical controllers interaction profile Hand Interaction Profile Hand tracking with poke\/pinch interactor LeonardoXR Hand Interaction Profile Hand tracking with poke\/pinch interactor"}