1- # DTrack Plugin for the Unity Game Engine 2019.x
1+ # DTrack Plugin for Unity Game Engine 2019.x or later
22
33This is a component for Unity 2019.1 or later with the purpose of
44native integration of the Advanded Realtime Tracking (ART) DTrack
5- (versions 2 and 3 ) tracking solutions. This Unity Asset provides
5+ (DTrack2 or DTrack3 ) tracking solutions. This Unity Asset provides
66access to DTrack tracking data, that is send over network using
77UDP/IP datagrams. Each UDP packet contains one frame of tracking
88data including all outputs activated via the DTrack software (see
99Section [ ** DTrack** ] ( #DTrackShortGuide ) ). This package currently
10- supports the DTrack body ` 6d ` and flystick ` 6df2 ` data formats.
10+ supports the DTrack standard body ` 6d ` and Flystick ` 6df2 ` data formats.
1111
1212## Download <a name =" download " ></a >
1313
1414You can download or clone sources for this Asset package at
15- [ GitHub] ( http://github.com/ar-tracking/UnityDTrackPlugin )
15+ [ GitHub] ( http://github.com/ar-tracking/UnityDTrackPlugin ) .
16+
17+ You can download a ready-to-use Unity package ( UnityDTrackPlugin-vX.X.X.unitypackage ) at
18+ [ GitHub releases] ( http://github.com/ar-tracking/UnityDTrackPlugin/releases ) .
1619
1720## Prerequisites
1821
19- To use this Asset the following components are required.
22+ To use this Asset the following components are required:
2023
2124- Unity Editor 2019.1 or later
2225- Windows 64 bit, Linux 64 bit
@@ -30,6 +33,9 @@ To use this Asset the following components are required.
3033In order to create a Unity package from the provided sources, follow
3134the steps below.
3235
36+ If you downloaded a ready-to-use Unity package ( UnityDTrackPlugin-vX.X.X.unitypackage ),
37+ proceed with [ ** Importing Unity package** ] ( #importing ) .
38+
33391 . Download or clone sources for this Asset package ( see [ ** Download** ] ( #download ) )
3440- Launch Unity
3541- Create new Unity project ( e.g., "MyUnityProject" )
@@ -38,22 +44,25 @@ the steps below.
3844- Export package ( right-click on DTrack in the ** Project** window and
3945 select ** Export Package...** )
4046
41- ### Importing Unity package
47+ ** Please note:** if you created the Unity package from sources and you want to try the available example scene,
48+ you need to assign DTrack scripts and to configure the plugin manually ( see [ ** Plugin Configuration** ] ( #pluginconfiguration ) ).
49+
50+ ### Importing Unity package <a name =" importing " ></a >
4251
43521 . Launch Unity
4453- Create/Open Unity project
4554- Import package ( * Assets* &rarr ; * Import Package...* &rarr ; * Custom Package...* )
4655
56+
4757## DTrack Configuration
4858
4959Find here a quick-start guide to DTrack. For details, please, refer
5060to your DTrack User's Guide and DTrack Programmer's Guide, that is
5161shipped with the DTrack distribution. In this section we assume that
5262the ART tracking system is properly set up and a room calibration
53- was done. Further, a set of 6DOF targets and flysticks are
63+ was done. Further, a set of 6DOF targets and/or Flysticks are
5464calibrated.
5565
56-
5766### Room Calibration
5867
5968For general information about the DTrack room calibration and room
@@ -89,14 +98,11 @@ and Z axes, i.e.,<br>
8998![ Figure: DTrack and Unity coordinate systems] ( Doc/images/dtrack-vs-unity.png )
9099<br ><br >
91100
92-
93101DTrack offers a multitude of ways to adjust coordinate systems for
94102room and bodies, e.g., offsets, scaling, additional rotations, or
95103shifting the origin of bodies. Consult your manual for details on
96104* Room adjustment* and * Body adjustment* .
97105
98-
99-
100106### Setting outputs <a name =" DTrackSettingOutputs " ></a >
101107
102108To configure the tracking data stream generated by DTrack, execute
@@ -105,14 +111,13 @@ these steps:
1051111 . Activate a channel if needed
106112- Fill in the IP/Port of the device receiving tracking data
107113- Select outputs you are interested in (i.e., currently frame counter ` fr ` ,
108- time stamp ` ts ` , 6DOF standard body ` 6d ` and flystick ` 6df2 ` are
114+ 6DOF standard body ` 6d ` and Flystick ` 6df2 ` are
109115supported) via the menu * Tracking* &rarr ; * Output* (DTrack3) or * Settings*
110116&rarr ; * Output* (DTrack2), respectively.
111117
112118![ Figure: DTrack output dialog] ( Doc/images/dtrack-output.png )
113119<br ><br >
114120
115-
116121### Data display ( 6DOF ) <a name =" DTrackDataDisplay6DOF " ></a >
117122
118123Enable the * data display* view ( * View* &rarr ; * Data* ) to find
@@ -123,22 +128,20 @@ tracking volume.
123128![ Figure: DTrack data display body] ( Doc/images/dtrack-data-body.png )
124129<br ><br >
125130
126-
127131### Data display ( Flystick ) <a name =" DTrackDataDisplayFlystick " ></a >
128132
129- Enable the * flystick * view ( * View* &rarr ; * Flystick* ) to find
130- assigned flystick IDs. Listed flystick IDs are prefixed with a
131- capital ** ` F ` ** . When referencing flysticks from within Unity in the
133+ Enable the * Flystick * view ( * View* &rarr ; * Flystick* ) to find
134+ assigned Flystick IDs. Listed Flystick IDs are prefixed with a
135+ capital ** ` F ` ** . When referencing Flysticks from within Unity in the
132136` DTrackReceiverFlystick ` mask, this prefix must be removed. In addition to
133- position and rotation data, button presses (_ b1_ ,...,_ b6 _ ), joystick movement
134- (_ jx_ ,_ jy_ ) are illustrated in the table.
137+ position and rotation data, button presses (_ b1_ ,...,_ b8 _ ), joystick movement
138+ (_ jx_ ,_ jy_ ) and trigger ( _ jt _ ) are illustrated in the table.
135139
136140![ Figure: DTrack data display flystick] ( Doc/images/dtrack-data-flystick.png )
137141<br ><br >
138142
139143
140-
141- ## Plugin Configuration
144+ ## Plugin Configuration <a name =" pluginconfiguration " ></a >
142145
143146Streaming position, rotation and button events data from DTrack
144147tracking systems to objects in your scene, requires appropriate
@@ -147,7 +150,7 @@ it a name, e.g., **DTrackSource**. To this object attach the
147150** DTrack** script via * Add Component* &rarr ; * Scripts* &rarr ;
148151* DTrack* &rarr ; * DTrack* . Set * Listen Port* number matching the
149152setting for DTrack (see Section [ ** Setting outputs** ] ( #DTrackSettingOutputs )
150- below). Note that 3D position data in the DTrack output stream have unit
153+ below). Note that 3DOF position data in the DTrack output stream have unit
151154millimeters. The DTrack Unity Plugin converts such values to unit meter.
152155
153156![ Figure: Unity DTrackSource inspector] ( Doc/images/unity-dtrack-source.png )
@@ -174,18 +177,17 @@ In your scene attach via *Add Component* the DTrack script
174177` DTrackReceiverFlystick ` to an object you want to receive positional
175178and rotational data as well as interactive button and joystick
176179events. In the ` DTrackReceiverFlystick ` mask type in the ID that was
177- assigned to the flystick by DTrack
180+ assigned to the Flystick by DTrack
178181(see Section [ ** Data display (Flysticks)** ] ( #DTrackDataDisplayFlystick ) ).
179182
180183![ Figure: Unity Flystick inspector] ( Doc/images/unity-dtrack-flystick.png )
181184<br ><br >
182185
183-
184186### Attaching 6DOF Targets to Camera
185187
186188For non-static, point-of-view cameras, you can attach a DTrack
187189Receiver with positional and rotational data, e.g., 6DOF body or
188- flystick .
190+ Flystick .
189191
190192![ Figure: Unity POV Camera inspector] ( Doc/images/unity-dtrack-pov.png )
191193<br ><br >
0 commit comments