UVRPN - VRPN wrapper for Unity3D
You can build the plugin from scratch, or use the download in the releases, or use the Unity package in the releases which includes built plugins for Windows, OS X, Linux, and Android.
Recently tested with an ART DTrack device under Windows 64bit and Unity 2017.2.
- Easy integration of multiple VRPN tracking devices
- Supports Trackers, Buttons and Analog data
- No external application or heavy-weight framework needed
- Nice interface with custom editors
- Download and import the latest release.
- Add a VRPN_Manager component to any object in the scene.
- Hostname: The IP address or hostname of the VRPN server / localhost.
- Add a VRPN_Tracker, VRPN_Button or VRPN_Analog component to any object you want to track with VRPN. Configure it as follows:
- Host reference: The GameObject with the VRPN_Manager component you want to use for this object.
- Tracker: The name of the tracker on the VRPN server.
- Channel: Channel on the server.
The the .unitypackage only contains .dll files. The source is included in /UVRPN_Unity/Assets/Scripts/.
The source is located in /native_source/.
Be sure to initialize/update the vrpn submodule in order to compile the plugin.
mkdir build
cd build
ccmake ../
make
public static double Analog(string address, int channel)
This gets an analog value from the vrpn address and the channel. When first called with a new address, the vrpn connection will be created. An address's values will be updated at most once per frame.
public static bool Button(string address, int channel)
This gets a boolean value from the vrpn address and the channel. When first called with a new address, the vrpn connection will be created. An address's values will be updated at most once per frame.
public static Vector3 TrackerPos(string address, int channel)
This gets position component of a tracker at the vrpn address and the channel. When first called with a new address, the vrpn connection will be created. An address's values will be updated at most once per frame.
public static Quaternion TrackerQuat(string address, int channel)
This gets rotation component of a tracker at the /vrpn address and the channel. When first called with a new address, the vrpn connection will be created. An address's values will be updated at most once per frame.
UVRPN has been forked from arviceblot/unityVRPN.