Skip to content

arviceblot/unityVRPN

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnityVRPN

Simple 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.

Getting Started

  1. Download and import the package.
  2. Add a TrackerHostSettings component to any object in the scene.
    • Hostname: The IP address or hostname of the VRPN server.
    • Type: Choose whether to transform the coordinates from the VRPN server for Vicon systems.
  3. Add a TrackerSettings component to any object you want to track with VRPN.
    • Host Settings: The GameObject with the TrackerHostSettings component to want to use for this object.
    • Object Name: The name of the tracker on the VRPN server.
    • Channel: Channel on the server.

Compiling

Be sure to initialize/update the vrpn submodule in order to compile the plugin.

mkdir build
cd build
ccmake ../
make

Reference

-> public static double vrpnAnalog(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 vrpnButton(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 vrpnTrackerPos(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 vrpnTrackerQuat(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.

About

Simple VRPN wrapper for Unity3D

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 61.7%
  • C++ 36.5%
  • CMake 1.8%