This is a plug-in for the Unreal Engine with the purpose of native integration of the Advanded Realtime Tracking DTrack and DTrack2 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
data format.
- Unreal Engine 5.0.1. It also works for Unreal4 from Unreal 4.23 and later
- Windows
- Microsoft Visual Studio 2022 for UE5 and Visual Studio 2017 and 2019 for UE4 (Express or Community Edition should suffice)
- Adapt the .uplugin file to the version of your UnrealEditor:
TheEngineVersion
key in the file DTrackPlugin.uplugin comes with a default value corresponding to the latest tested UE4Editor version (e.g."EngineVersion": "5.0.1"
or"EngineVersion": "4.25.0"
).
If you are using an UE4Editor version with a different minor version number (e.g. 4.23 instead of 4.25), you should adjust this value (e.g. to"EngineVersion": "4.23.0"
).
- Compile the plugin manually:
<UE5Dir>\Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -Plugin=/Path/to/DTrackPlugin.uplugin -TargetPlatforms=Win64 -Package=<OutDir> -Rocket - Copy <OutDir> to <UE5Dir>\Engine\Plugins\DTrackPlugin
- Open the UE5Editor 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
and 6df2
.
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.