Attaching Tracking Scripts

Attaching Tracking Scripts with InsightX

After integrating your Unity project with the InsightXR dashboard, the final step in setting up is to attach tracking scripts to the relevant objects within your XR environment. These scripts are essential for capturing detailed interaction data and user movements, which are crucial for analytics.

Preparing for Script Attachment

  1. Identify Key Objects for Tracking: Before attaching scripts, identify which objects in your scene are crucial for tracking. This typically includes objects that users will interact with, such as tools, machinery, or other interactive elements, as well as the user's avatar, specifically the head and hands for motion and gaze tracking.

  2. Accessing the InsightXR Scripts: Within your Unity project, navigate to the folder where the InsightXR package was imported. This package includes a variety of scripts designed for different tracking purposes.

Attaching Scripts to the Player’s Head and Hands

  1. Player Avatar Setup: In your scene hierarchy, locate the player avatar, which represents the user in the XR environment. Specifically, focus on the head and hand components, which are usually part of the avatar prefab.

  2. Head Tracking Script:

    • Find the head component (often a camera representing the player’s viewpoint).

    • Drag and drop the InsightXR head tracking script Insight XR Tracking Manager onto this component. This script is responsible for capturing where the user is looking and how they are moving their head.

  3. Hand Tracking Scripts:

    • Locate the hand components in the avatar prefab. There are typically two – one for each hand.

    • Attach the InsightXR hand tracking scripts Insight XR Tracking Manager to these components. These scripts will track hand movements and interactions, such as grabbing or pointing, which are vital for understanding user engagement and actions within the training.

Attaching Scripts to Interactive Objects

  1. Selecting Interactive Objects: Choose the objects in your scene that the user will interact with during the training. This can include tools, buttons, levers, or any other object that is part of the training tasks.

  2. Applying Interaction Scripts:

    • For each interactive object, attach the appropriate InsightXR interaction script. Insight XR Tracking Manager

    • These scripts can varied data interactions based on the type of interaction expected (e.g., grabbable, touchable, activatable).

Testing and Validation

  1. Test the Setup: After attaching all the scripts, run your scene in Unity to test the setup. Engage with the objects and observe whether their interactions are being tracked as expected in the console. Based on your intended action, you would see logs with InsightXR: prefix.

  2. Verify Data Capture: Check the InsightXR dashboard to ensure that data from your interactions is being captured and displayed correctly. Look for real-time updates in the dashboard as you interact with objects in the Unity scene.

  3. Adjustments and Fine-Tuning: Based on the initial test results, make any necessary adjustments to the script settings or placements to optimize data capture and tracking accuracy.

Conclusion

By meticulously attaching tracking scripts to the player's head, hands, and interactive objects within the scene, you set the foundation for comprehensive analytics in your XR training application. This setup allows InsightXR to capture a rich dataset, encompassing all critical aspects of user interaction and behavior, thereby enhancing the effectiveness and depth of your XR training analytics.

Last updated

Was this helpful?