Various rotation issues beyond 180 degrees in SteamVR with VRidge

Issue #1 new
Elliot Hawkins repo owner created an issue

In SteamVR, you can only rotate 180 degrees when used with VRidge. Unsure if issue is between PSMoveService and Freepie, Freepie and VRide, or VRidge and SteamVR. Alternatively, could be issue with the included example script.

Comments (6)

  1. Elliot Hawkins reporter

    Fixed the rotation for pitch and roll by incorporating the GLM library and using it to convert controller orientation to Eular angles before sending to FreePIE. There is a very small deadzone around the 180 degree point where it appears to jump, but otherwise those axis look solid.

    Yaw is still broken past 180 degrees, though its symptom has changed. Instead of the rotation rolling backwards at 180, it now appears to affect other axis, for example looking up or down.

  2. Elliot Hawkins reporter

    Fixed yaw, but now it's apparent that rotation on a given axis only works when no other axis are rotated.

  3. William Groom

    I had another look at using the orientation for VRidge and I believe the following code works reasonably well as long as the controller isn't upside-down. I thought it may be useful for the example script.

    freeTrack.pitch = -freePieIO[0].pitch * math.cos(freePieIO[0].yaw/2) - freePieIO[0].roll * math.sin(freePieIO[0].yaw/2)
    freeTrack.roll = - freePieIO[0].pitch * math.sin(freePieIO[0].yaw/2) + freePieIO[0].roll * math.cos(freePieIO[0].yaw/2)
    
  4. Elliot Hawkins reporter

    Thanks! I unfortunately can't test it myself right now, Riftcat is acting up for me at the moment. I'll still include it in the example script for today's release since the phone sensors are still there as a fallback.

  5. Log in to comment