Relative rotation on a custom axis?
I'm trying to track the rotation of a VR controller on one axis (think a controller on a turntable or something) and make it correspond to a wheel on a hinge joint, but its orbitals are wonky, with x/y/z rotation jumping between positive and negative numbers. Sometimes it'll track its way up to 82 or something, and then jump to 100 before acting normally, sometimes it'll go from 60 to -51 randomly, etc. I'm sure it would make sense if I could get the axis right.
My current solution is to use the relative rotation (quaternion q = Inverse(quaternion a) * quaternion b) and set that to angleaxis to see the actual change in axis (which I divide by delta time to get a target velocity for the hinge on the wheel with its motor turned on.)
This works for rotation on the y-axis relative to gravity. Like, if I spin the controller on its y axis, I get the change in rotation. But when I spin the controller on a z or x axis, the rotation isn't picked up. That is, the wheel doesn't move. It moves when I spin the controller on the y-axis, but even then, there's a weird moment where the wheel seemingly wobbles by moving backwards slightly before moving forwards again (I imagine this is because the axis flipped on the controller?).
Does anyone know how to make relative rotation be the rotation tracked on a custom axis? Like a way to set it to track rotation around a z or x instead of what seems to be the default y axis only?
Is there a way to set up a custom gameobject linked to it that spins specifically in accordance with the controller, but it spins normally? Like, if I spin the controller in a weird way, balancing on the tip of the ring or something, the custom gameobject will appear to spin normally on its orbitals? Please ask if you need additional details.