This is a plug-in for the Unreal Engine with the purpose of native integration of the Advanded Realtime Tracking DTrack tracking solutions. It injects data into the engine through LiveLink. Data can be accessed through Blueprint or C++. The plugin currently supports the DTrack body6d
and flystick6df2
as well as the finger tracking gl
data format.
- Unreal Engine 4 (4.23 or later), Unreal Engine 5 (5.0 or later)
- Windows
- Linux
- Microsoft Visual Studio. See the Unreal documentation for selecting and installing the correct version.
- Compile the plugin manually:
<UEDir>\Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -Plugin=\Path\to\DTrackPlugin.uplugin -TargetPlatforms=Win64/Linux -Package=<OutDir> -Rocket -VS20XY
Here -VS20XY designates the Visual Studio version chosen above (e.g. -VS2022). - Copy the folder <OutDir> to <UE4Dir>\Engine\Plugins\DTrackPlugin
- Open the Unreal Editor and create an Unreal C++ project
- Copy the plugin to <project>\Plugins\DTrackPlugin
- Compilation then takes place automatically when starting your Unreal project
For general information about the DTrack room calibration and room adjustment see the DTrack User Manual. Here we discuss details relevant for use with the Unreal Engine.
The calibration angle which comes with your ART tracking system defines the coordinate system layout in your tracking area. It consists of four retroreflective or active markers mounted onto a L-shaped frame.
The marker in the edge of this L-shape by default designates the origin of the DTrack coordinate system. When using the Normal calibration mode, the long arm of this L-shape corresponds to the X axis, the short arm to the Y axis. DTrack coordinates refer to a right-handed coordinate system, so when the angle is placed flat on the ground with the markers on top the Z axis points upwards.
You can change orientation and position of the DTrack coordinate system with respect to the calibration angle via Tracking > Room adjustment in the DTrack UI.
The plugin transforms a right-handed position of a DTrack 6DoF measurement to a left-handed Unreal position by inverting the Y axis:
( XUnreal , YUnreal , ZUnreal ) = ( XDTrack , -YDTrack , ZDTrack ) .
Via Tracking > Output in the DTrack UI you can set up IP and port of the host of your Unreal Editor or application.
In the corresponding dialog, you can also enable the DTrack output types 6d
, 6df2
and gl
.
See UnrealDTrackSample for a detailed example.
The mapping of Flystick buttons and joystick is listed in DTrackFlystickInputDevice.cpp within the DTrackPlugin\Source\DTrackInput\Private directory.