Xsens MVN plug-in for Unity
Step 1. Setting up the MVN device
- Open MVN Studio.
- Open an MVN file, MVNX file or use the MVN suit in a live setup.
- Go to: Options ->Preferences ->Miscellaneous ->Network Streamer.
- Make sure you check ‘Enable network streaming’.
- When recording in 240Hz, set ‘Down sampling skip factor’ to 7. This will downsample the frame rate to the natively supported 30 fps for Unity. For live streaming set ‘Downsampling skip factor ‘ to 0.
- Set “Protocol and dataset” to Unity3D
- Input an IP-address of the client PC (the PC where Unity is running). If it is the same PC as where MVN Studio is running, use either ‘localhost’ or ‘127.0.0.1’
NOTE: To test if the streaming is set-up properly, you can simply start the ‘Demo.unity’ file. You can
find this in the project tab under the folder ‘Assets ->Xsens-> MvnLive ->Demo’. Make sure you have a file running in MVN Studio.
Once you start up the Unity scene, you should see two characters move. One uses an FBX file, and the second one should receive data from MVN Studio.
Step 2. Setting up Unity
- Open Unity
- Go to the Assets store and download: MVN Live Animation
- In the ‘Project’ tab go to: Assets -> Xsens ->MVNLive ->Prefabs
- Drag the ‘MvnPuppet’ into the hierarchy
- Drag the ‘MvnActors’ into the hierarchy
- Select ‘MvnPuppet’ in the hierarchy
- In the Inspector tab, add the ‘Xs Live Animator’ by going to: Add Component -> Scripts ->xsens
- Then, while still having selected ‘MvnPuppet’. Drag ‘MvnActors’ from the Hierarchy into ‘Mvn Actors’
You should now able to run the game, and stream live into Unity.
The Unity plug-in supports more than one character at the same time. To do this, copy/paste the ‘MvnPuppet’ in the hierarchy.
You can also chance the Actor ID for every ‘MvnPuppet’ to the desired MVN Studio stream ID (1,2,3 or 4).