{"id":13340047,"url":"https://github.com/ar-tracking/UnityDTrackPlugin","last_synced_at":"2025-03-11T16:31:57.687Z","repository":{"id":134108311,"uuid":"232794019","full_name":"ar-tracking/UnityDTrackPlugin","owner":"ar-tracking","description":"ART DTRACK Plugin for Unity Game Engine 2019 or later","archived":false,"fork":false,"pushed_at":"2024-05-04T20:29:54.000Z","size":1450,"stargazers_count":10,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-24T04:26:17.397Z","etag":null,"topics":["unity","virtual-reality","vr"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ar-tracking.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-09T11:32:42.000Z","updated_at":"2024-07-29T09:46:17.000Z","dependencies_parsed_at":"2024-10-24T00:10:51.970Z","dependency_job_id":"01dcb3dd-a527-4ea2-8aad-d7ee904e5236","html_url":"https://github.com/ar-tracking/UnityDTrackPlugin","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar-tracking%2FUnityDTrackPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar-tracking%2FUnityDTrackPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar-tracking%2FUnityDTrackPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ar-tracking%2FUnityDTrackPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ar-tracking","download_url":"https://codeload.github.com/ar-tracking/UnityDTrackPlugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243070370,"owners_count":20231438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["unity","virtual-reality","vr"],"created_at":"2024-07-29T19:22:05.504Z","updated_at":"2025-03-11T16:31:52.672Z","avatar_url":"https://github.com/ar-tracking.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ART DTRACK Plugin for Unity Game Engine 2019 or later\n\n**Version v1.1.3**\n\nThis is a component for Unity 2019 or later with the purpose of\nnative integration of the Advanced Realtime Tracking (ART) DTRACK\n(DTrack2 or DTRACK3) realtime tracking solutions.\n\n![Figure: ART DTRACK](Documentation~/images/card-dtrack.png)\n\u003cbr\u003e\n\nThis Unity Asset provides\naccess to DTRACK realtime tracking data, that is sent over network using\nUDP/IP datagrams. Each UDP packet contains one frame of tracking\ndata including all outputs activated via the DTRACK software (see\nsection [**DTRACK Configuration**](#dtrackconfiguration)). This package currently\nsupports the DTRACK Standard Body ('6d'), Flystick ('6df2') and Fingertracking ('gl') data formats.\n\n## Features \u003ca name=\"features\"\u003e\u003c/a\u003e\n\n- Validated with Unity Editors 2019.4 to 2023.2 (but should work with any later Unity)\n- Supports DTRACK room calibration modes 'Powerwall' and 'Normal'\n- Supports tracking of 6DOF Standard Bodies and Flystick2, Flystick2+ and Flystick3\n- Supports Flystick buttons and joystick/trigger (emitting Unity events)\n- Supports Fingertracking, with 'Leap Motion Realistic Male/Female Hands' (by Storkplay)\n- (Optionally) enables UDP connection through stateful firewall\n\n## Installing the ART DTRACK Plugin \u003ca name=\"installing\"\u003e\u003c/a\u003e\n\nThere are several ways to get the ART DTRACK Plugin.\n\n### Unity Asset Store \u003ca name=\"assetstore\"\u003e\u003c/a\u003e\n\nThe plugin is available (for free) in the Unity Asset Store \n[https://assetstore.unity.com/packages/tools/integration/art-dtrack-plugin-246990](https://assetstore.unity.com/packages/tools/integration/art-dtrack-plugin-246990).\n\nAfter 'purchasing' you can install it via the Unity Package Manager:\n\n1. Launch Unity Hub\n- Create/Open Unity project\n- Open Package Manager ( *Window* \u0026rarr; *Package Manager* \u0026rarr; *Packages: My Assets* )\n- Download the package (button *Download* ), then install it (button *Install* )\n\nThe plugin will be installed in your project's Assets folder:\u003cbr\u003e\n/path/to/unity/projects/*MyUnityProject*/**Assets/ARTDTrackPlugin**/ .\n\n### OpenUPM \u003ca name=\"openupm\"\u003e\u003c/a\u003e\n\nOpenUPM is an open-source service hosting lots of (UPM) Unity packages, all of them released as open-source.\nThe ART DTRACK plugin is available (for free) via\n[https://www.openupm.com/packages/com.ar-tracking.dtrack](https://www.openupm.com/packages/com.ar-tracking.dtrack).\n\nTo install it, follow the instructions mentioned at the above website; roughly:\n\n1. Launch Unity Hub\n- Create/Open Unity project\n- Open *Edit* \u0026rarr; *Project Settings...* \u0026rarr; *Package Manager*\n- Add a new Scoped Registry (corresponding to the above OpenUPM link), then click *Save* or *Apply*\n- Open Package Manager ( *Window* \u0026rarr; *Package Manager* \u0026rarr; *Packages: My Registries* )\n- Choose _ART DTRACK Plugin_ , then install it (button *Install* )\n\nThe plugin will be installed in your project's Packages folder:\u003cbr\u003e\n/path/to/unity/projects/*MyUnityProject*/**Packages/ART DTRACK Plugin**/ .\n\n### GitHub \u003ca name=\"github\"\u003e\u003c/a\u003e\n\nYou can download a ready-to-use custom Unity package ( UnityDTrackPlugin-vX.X.X.unitypackage ) at\u003cbr\u003e\n[https://github.com/ar-tracking/UnityDTrackPlugin/releases](https://github.com/ar-tracking/UnityDTrackPlugin/releases).\n\nIn order to install the package, follow the steps below.\n\n1. Launch Unity Hub\n- Create/Open Unity project\n- Import package ( *Assets* \u0026rarr; *Import Package...* \u0026rarr; *Custom Package...* )\n\nThe plugin will be installed in your project's Assets folder:\u003cbr\u003e\n/path/to/unity/projects/*MyUnityProject*/**Assets/ARTDTrackPlugin**/ .\n\n### Plain Sources \u003ca name=\"plainsources\"\u003e\u003c/a\u003e\n\nYou can download or clone sources for this plugin at\n[https://github.com/ar-tracking/UnityDTrackPlugin](https://github.com/ar-tracking/UnityDTrackPlugin).\n\n### Updating from ART DTRACK Plugin v1.0.3 or later\n\n**IMPORTANT:** To update an older plugin within an existing Unity project it's necessary to replace the entire directory\n/path/to/unity/projects/*MyUnityProject*/Assets/**DTrack**/ or\u003cbr\u003e\n/path/to/unity/projects/*MyUnityProject*/Assets/**ARTDTrackPlugin**/ , if present.\n\n1. Launch Unity Hub\n- Open Unity project\n- Remove the directory, either manually or in Unity Editor (e.g. *Project* \u0026rarr; *Assets* \u0026rarr; *DTrack* \u0026rarr; *(right click) Delete* )\n- Install the ART DTRACK Plugin (see above)\n\nThere's no need to adjust settings in already attached scripts ( **DTrack**, **DTrackReceiver6Dof**,\n**DTrackReceiverFlystick**, ... ).\n\n**Please note:** The formerly (ART DTRACK Plugins v1.0.X) used 'Unity events' to notify pressed\nFlystick buttons were declared deprecated\nand will be removed in some future version of the plugin. Please don't use them in new projects\n(see section [**Applying Flystick Data**](#pluginconfigurationflystick) ).\n\n**Tip:** If after an update existing button event settings ( *Button Press Event X*, now denoted as\n*Button X Pressed Event Deprecated* ) are not shown in Unity Editor, exiting and re-starting of the Unity Editor might help.\n\n\n## DTRACK Configuration \u003ca name=\"dtrackconfiguration\"\u003e\u003c/a\u003e\n\nFind here a quick-start guide to DTRACK. For details, please refer\nto your _DTRACK3 User's Guide_ and _DTRACK3 Programmer's Guide_ , that is\nshipped with the DTRACK distribution. In this section we assume that\nthe ART tracking system is properly set up and a room calibration\nwas done. Further, a set of Standard Bodies and/or Flysticks and/or Fingertracking hands is\ncalibrated.\n\n### Room Calibration \u003ca name=\"dtrackroomcalibration\"\u003e\u003c/a\u003e\n\nFor general information about the DTRACK room calibration and room\nadjustment see the _DTRACK3 User's Guide_ . Here we discuss details\nrelevant for use with the Unity Engine.\n\nDTRACK coordinates refer to a right-handed coordinate system, whereas\nUnity is using a left-handed coordinate system with the Y axis pointing\nup. The plugin provides two possibilities to convert DTRACK coordinates\ninto the Unity world, corresponding to the two DTRACK calibration modes\n( setting _coordinate system_ ).\n\n![Figure: DTRACK3 room calibration dialog](Documentation~/images/dtrack-room-calibration.png)\n\u003cbr\u003e\n\nThe calibration angle tool which comes with your ART tracking system\ndefines the coordinate system layout in your tracking area. It\nconsists of four retroreflective or active markers mounted onto an\nL-shaped frame. The marker on top of the edge of this L-shape by default\ndesignates the origin of the DTRACK coordinate system. \n\n![Figure: DTRACK calibration angle tool](Documentation~/images/calibration-angle.png)\n\u003cbr\u003e\n\n#### DTRACK Calibration Mode 'Powerwall'\n\n**Please note:** It's recommended to use this calibration mode.\n\nWhen using the DTRACK _Powerwall_\ncalibration mode (see figure below), the long arm of this L-shape\ncorresponds to the X axis and the short arm to the (-Z) axis. DTRACK\ncoordinates refer to a right-handed coordinate system, so if the\ntool is placed flat on the ground with the markers pointing up, the\nY axis points upwards.\n\nThe plugin transforms a right-handed position of a DTRACK 6DOF\nmeasurement to a left-handed Unity position by negating the Z\naxis, i.e.\u003cbr\u003e\n\n**(** ***X***\u003csub\u003eUnity\u003c/sub\u003e , ***Y***\u003csub\u003eUnity\u003c/sub\u003e ,\n***Z***\u003csub\u003eUnity\u003c/sub\u003e ) = ( ***X***\u003csub\u003eDTRACK\u003c/sub\u003e ,\n***Y***\u003csub\u003eDTRACK\u003c/sub\u003e, ***-Z***\u003csub\u003eDTRACK\u003c/sub\u003e **)**.\n\n![Figure: DTRACK and Unity coordinate systems](Documentation~/images/dtrack-vs-unity-powerwall.png)\n\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;DTRACK and Unity coordinate systems in _Powerwall_ mode\n\u003cbr\u003e\n\n#### DTRACK Calibration Mode 'Normal'\n\nThis was the only available mode in ART DTRACK plugin prior to v1.1.1.\n\n**Please note:** It's recommended to prefer the 'Powerwall' calibration mode (see above).\n\nWhen using the DTRACK _Normal_\ncalibration mode (see figure below), the long arm of the L-shape\ncorresponds to the X axis and the short arm to the Y axis. DTRACK\ncoordinates refer to a right-handed coordinate system, so if the\ntool is placed flat on the ground with the markers pointing up, the\nZ axis points upwards.\n\nThe plugin transforms a right-handed position of a DTRACK 6DOF\nmeasurement to a left-handed Unity position by switching the Y\nand Z axes, i.e.\u003cbr\u003e\n\n**(** ***X***\u003csub\u003eUnity\u003c/sub\u003e , ***Y***\u003csub\u003eUnity\u003c/sub\u003e ,\n***Z***\u003csub\u003eUnity\u003c/sub\u003e ) = ( ***X***\u003csub\u003eDTRACK\u003c/sub\u003e ,\n***Z***\u003csub\u003eDTRACK\u003c/sub\u003e, ***Y***\u003csub\u003eDTRACK\u003c/sub\u003e **)**.\n\n![Figure: DTRACK and Unity coordinate systems](Documentation~/images/dtrack-vs-unity.png)\n\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;DTRACK and Unity coordinate systems in _Normal_ mode\n\u003cbr\u003e\n\n### Setting Outputs \u003ca name=\"dtracksettingoutputs\"\u003e\u003c/a\u003e\n\nTo configure the tracking data stream generated by DTRACK, execute\nthese steps:\n\n1. Open dialog *Output Settings* via menu *Tracking* \u0026rarr; *Output* (DTRACK3) or *Settings*\n\u0026rarr; *Output* (DTrack2), respectively\n- Activate a channel if needed\n- Fill in hostname or IP address, and UDP port number of the device receiving tracking data\n- Select outputs you are interested in (i.e., currently frame counter 'fr',\n6DOF Standard Body '6d', Flystick '6df2' and Fingertracking 'gl' are\nsupported)\n\n![Figure: DTRACK3 output dialog](Documentation~/images/dtrack-output.png)\n\u003cbr\u003e\n\n### Identifying Body IDs \u003ca name=\"dtrackidentifyingbodyids\"\u003e\u003c/a\u003e\n\nThere are several ways to identify the ID numbers of DTRACK Standard Bodies, Flysticks and Fingertracking hands,\nas needed later to configure the Unity plugin. E.g. refer to column *ID* in dialog *Body Administration*\nvia menu *Tracking* \u0026rarr; *Body Administration* (DTRACK3) or *Settings* \u0026rarr; *Body Administration* (DTrack2).\n\n![Figure: DTRACK3 body administration dialog](Documentation~/images/dtrack-body-administration-standard.png)\n\u003cbr\u003e\n\nNote that listed Flystick IDs are prefixed with a capital **'F'**, as well as listed Fingertracking hand IDs\nare prefixed with a capital **'H'**. When referencing Flysticks or Fingertracking hands from within Unity,\nthis prefix must be removed.\n\n![Figure: DTRACK3 body administration dialog](Documentation~/images/dtrack-body-administration-flystick.png)\n\u003cbr\u003e\n\n\n### Fingertracking \u003ca name=\"dtrackfingertracking\"\u003e\u003c/a\u003e\n\nWhen configuring ART Fingertracking hand devices with 3 thimbles, be sure to activate the _Simulate 5 fingers_ setting.\n\n![Figure: DTRACK3 Fingertracking administration dialog](Documentation~/images/dtrack-fingertracking-administration.png)\n\u003cbr\u003e\n\n\n## Plugin Configuration \u003ca name=\"pluginconfiguration\"\u003e\u003c/a\u003e\n\nStreaming position, rotation and button events data from DTRACK\ntracking systems to objects in your scene, requires appropriate\nnetwork settings. In your scene add an *Empty* game object and give\nit a name, e.g. **DTrackSource**. To this object attach the\n**DTrack** script via *Add Component* \u0026rarr; *Scripts* \u0026rarr;\n*DTrack* \u0026rarr; *DTrack*.\n\n- Set *Listen Port* number matching the\n  setting for DTRACK (see section [**Setting Outputs**](#dtracksettingoutputs))\n- Optionally set *Controller Host* with hostname or IP address of your ART Controller, if there is a\n  'stateful firewall' installed between Controller and Unity; normally that's sufficient to pass UDP packets\n  with tracking data to the plugin\n- Set *DTrack Coordinates* matching the calibration mode used in DTRACK\n  (see section [**Room Calibration**](#dtrackroomcalibration))\n\nNote that position data in the DTRACK output stream have unit\nmillimeters. The DTRACK Unity Plugin converts such values to unit meter.\n\n![Figure: Unity DTrackSource inspector](Documentation~/images/unity-dtrack-source.png)\n\u003cbr\u003e\n\n### Applying 6DOF Standard Body Data\n\nIn your scene attach via *Add Component* the DTrack script\n**DTrackReceiver6Dof** to an object you want to receive positional and\nrotational data. In the **DTrackReceiver6Dof** mask type in the ID\nthat was assigned to the Standard Body by DTRACK\n(see section [**Identifying Body IDs**](#dtrackidentifyingbodyids)).\n\n![Figure: Unity 6DOF inspector](Documentation~/images/unity-dtrack-6dof.png)\n\u003cbr\u003e\n\nWhen the ART tracking system is running, you should now be able to\nsee *Position* and *Rotation* data in the **Transform** box, as soon\nas you switch to *Play* mode.\n\n### Applying 6DOF Standard Body Data to the Camera\n\nFor non-static, point-of-view cameras, you can attach a DTRACK\nreceiver with positional and rotational data, e.g. of a 6DOF Standard Body.\n\n![Figure: Unity POV Camera inspector](Documentation~/images/unity-dtrack-pov.png)\n\u003cbr\u003e\n\n### Applying Flystick Data \u003ca name=\"pluginconfigurationflystick\"\u003e\u003c/a\u003e\n\nIn your scene attach via *Add Component* the DTrack script\n**DTrackReceiverFlystick** to an object you want to receive positional\nand rotational data. In the **DTrackReceiverFlystick** mask type in the ID that was\nassigned to the Flystick by DTRACK\n(see section [**Identifying Body IDs**](#dtrackidentifyingbodyids), without prefixed capital **'F'**).\n\n![Figure: Unity Flystick inspector](Documentation~/images/unity-dtrack-flystick.png)\n\u003cbr\u003e\n\nDTrack script **DTrackReceiverFlystick** can send 'Unity events' to announce changed Flystick buttons\nor joystick values to scripts attached to arbitrary game objects. It provides:\n\n- 8 events on changed Flystick buttons corresponding to the (maximum) number of 8 buttons of Flystick2+\n  ( *Button X Changed Event* ); an event is invoked once every time a button is pressed or released\n- One event on changed Flystick joystick values (horizontal and vertical) ( *Joystick Changed Event* );\n  the event is invoked every time one of the values has changed\n- One event on changed trigger value (just available at Flystick2+) ( *Analog 3 Changed Event* ); the event\n  is invoked every time the value has changed\n\n**Please note:** The formerly (ART DTRACK Plugins v1.0.X) used 'Unity events' to notify pressed Flystick\nbuttons ( *Button Press Event X* ) were declared deprecated and will be removed in some future version of the plugin.\nPlease don't use them in new projects.\n\n![Figure: Unity Flystick inspector](Documentation~/images/unity-dtrack-flystick-analogs.png)\n\u003cbr\u003e\n\nSee scripts **ExampleFlystickListener** or **ExampleCameraNavigator** on how to receive these 'Unity events' in your scripts.\nTo register an own\nlistener routine first create an additional entry in the wanted *Event* element by pressing *+*. Then drag\nand drop the game object, that should receive the event, from the *Hierarchy* tree into the *Event* element.\nFinally choose the listener routine's name.\n\n### Applying Fingertracking Data\n\nThe DTRACK Plugin provides support of ART Fingertracking, so far adjusted\nfor usage with 'Leap Motion Realistic Male/Female Hands' (by Storkplay, available at\nthe Unity Asset Store), or hand models with equivalent rig and coordinate systems:\n\n- https://assetstore.unity.com/packages/3d/characters/humanoids/leap-motion-realistic-male-hands-109961\n- https://assetstore.unity.com/packages/3d/characters/humanoids/leap-motion-realistic-female-hands-211090\n\n![Figure: Leap Motion Realistic Male Hand](Documentation~/images/leapmotion-realistic-hand.png)\n\u003cbr\u003e\n\nAdd one of the *Prefabs* of your **LMRealisticFemaleHands** or **LMRealisticMaleHands** asset to your scene.\n\nWithin the root object of the created left or right hand (**Hand_0X_L** or **Hand_0X_R**)\nnow two components with missing scripts appear. Remove these components via\n*Remove Component*, attach instead via *Add Component* the DTrack script\n**LMRealisticHandMapper**. It automatically will attach also a DTrack script\n**DTrackReceiverHand**.\n\nIn **DTrackReceiverHand** mask enter the *Hand Id* that was assigned to the Fingertracking device by DTRACK\n(see section [**Identifying Body IDs**](#dtrackidentifyingbodyids), without prefixed capital **'H'**).\n\nIn **LMRealisticHandMapper** mask first ensure that the number of elements in list *Fingers* is *5*.\nNow enter links to the corresponding game objects of the hand,\nfor *Wrist* (**L_Wrist** or **R_Wrist**) and the fingers' root joints (**L_Finger_Index_A**, ... or\n**R_Finger_Index_A**, ...). This can be done e.g. by dragging and dropping the objects from the *Hierarchy*\ntree into the **LMRealisticHandMapper** mask.\nThe elements of *Fingers* have to be ordered as: thumb, index, middle, ring, pinky.\n\n![Figure: Unity Hand inspector](Documentation~/images/unity-dtrack-hand.png)\n\u003cbr\u003e\n\nIf the real size of the person's hand is differing too much from the hand model's size, it might be useful\nto modify the *Scale* factor in the **Transform** box of the hand's root object (**Hand_0X_L** or **Hand_0X_R**).\nIf setting *Automatic Scale* is enabled, the hand mapper script tries to find a suitable value automatically.\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\nAdvanced Realtime Tracking GmbH \u0026 Co. KG\u003cbr\u003e\nAm Oeferl 6\u003cbr\u003e\n82362 Weilheim i. OB\u003cbr\u003e\nGermany\u003cbr\u003e\n\nhttps://ar-tracking.com\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Far-tracking%2FUnityDTrackPlugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Far-tracking%2FUnityDTrackPlugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Far-tracking%2FUnityDTrackPlugin/lists"}