Controller interactions
Hello!
I've integrated the HTC vive with another software and now I'm trying to deveople some interactions. I'm trying to develope a grab and release interaction, with which I can translate and rotate the objects of my scene around.
I get the transform matrix of my controller when I click the trigger and then every time while I'm clicking. With those two matrices I get the transform matrix that would translate the controller from position t1 (when I click) to position t2 (next position). Then I multiply that matrix by the matrix that represent the position and orientation of my object in the scene, then the object should make the same move as the controller.
However, when I move around the movement is not precise, The object fails to follow the controller movement (eg: if I do a movement from left to right the obj might go also a little bit up or down). That might be due to lag between steam VR and the application anyway. Also the movement will depend from which position the obj start. (eg: I rotate my controller on the X axis while pointing to the positive of the Z axis, if the obj is orientated on the negative Z axis it will rotate on the opposite direction) So I can't get that intuitive interaction that you havee with VR that seems that the obj is on your hand.
So my questions is if anybody have done this previously with the matrices obtained from openvr, or knows any reference where it is explained. Also I would be happy to get any hint about it.
Thanks!
Man, I'm also developing an application with overlays (without DASHBOARD), so I had to manipulate arrays and object rotation. These two aplications have helped me a lot. Follow:
Https://github.com/matzman666/OpenVR-AdvancedSettings
Https://github.com/scudzey/UVROverlay