I'd like to build physical interfaces for VR. Things like knobs, levers and other mechanical things that you can interact with in the real world.
I have two questions pops in my mind on the subject: -How to register the placement of the physical device. -How to send the analog data back to game engine.
I believe feeding analog data (coming from a pot or switch) can be established easily by using an Arduino and sending the data over serial.
The part that i couldn't wrap my head around is the object placement and matching its position in the VR environment.
I think real world objects can be "located" by attaching the touch controllers onto them. Using that logic, would it be possible to create a physical interface with couple of IR LEDs on them to register their positions and show their exact locations in the VR environment?
Arduino is definitely a good way to integrate analog devices to a pc.
If you were just doing digital devices (buttons/switches) I'd recommend an i-pac. https://www.ultimarc.com/ipac1.html It's a little board that has 32 or 56 digital inputs and emulates a usb keyboard. It's made for building arcade cabinets for Mame emulators. No software needed, it's effectively just a keyboard. It's got per input debounce and no key ghosting. The 32 input version is just $39.
Locating the devices is trickier. Oculus don't provide access to the camera data and currently the sdk won't track unknown devices. So you can't use leds unless you use your own camera and software to do the tracking (I'd say have a look at Freetrack, but it hasn't updated for 8 years).
You could use a touch controller, as you suggested.
Another way is a leap motion. When it's attached to the front of a rift it has fairly accurate hand/finger tracking. It knows where your hands are relative to the rift, to a reasonable degree. You could grab the control then use the leap motion hand position to tell where the control is. I've actually been planning on doing that for a while, but I just haven't had time for VR programming lately. Here's an example of using leap motion to grab physical objects. It has issues, but might be good enough. https://www.youtube.com/watch?v=U_G_t-iHLU0