Using the vive controller movement as an analog stick

I am looking to use the motion of the vive controller for player movement in the same way as the analog sticks on a game controller such as the xbox as I would like to be able to switch between different kinds of controllers with minimal work. From what I have read, the new Unity SteamVR input system is designed to be used for different controllers but this is only for actions such as grab, teleport etc.

The only thing I can think of at the moment for using the vive controller for movement is to use controller.transform.position - lastPosition to determine the axes of motion in a binary format.

I need some guidance on how to take the vive controller pose and convert it to a range between 0 and 1 for example. Or am I being nonsensical?


Is there a reason you can’t just use the trackpad?

The problem with using the point in space isn’t so much whether it’s doable, but whether it would be doable sufficiently well and responsively that you could expect to switch controllers with minimal work. I’d think asides from the calibration/dead zone/limits issues, it would be very difficult to implement control of this kind that would be sufficiently equivalent to an XBox controller that you’d get away with the same game design/mechanics.