Skip to content

Instantly share code, notes, and snippets.

@maxweisel
Last active April 29, 2016 22:03
Show Gist options
  • Save maxweisel/6ed75c91f165e824ce73311959e28f52 to your computer and use it in GitHub Desktop.
Save maxweisel/6ed75c91f165e824ce73311959e28f52 to your computer and use it in GitHub Desktop.
void Update() {
/* ... */
SteamVR_Controller.Device device = SteamVR_Controller.Input((int)_trackedObject.index);
// Set our empty game object's rigid body to match the device's velocity and angular velocity.
_controllerRigidBody.velocity = device.velocity;
_controllerRigidBody.angularVelocity = device.angularVelocity;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment