We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when i run this,the z-coordinate of the positioning data is in the second position, and there is clearly an issue. Why is this?
code:
def convert_to_numpy(matrix): return np.array([[matrix.m[0][0], matrix.m[0][1], matrix.m[0][2], matrix.m[0][3]], [matrix.m[1][0], matrix.m[1][1], matrix.m[1][2], matrix.m[1][3]], [matrix.m[2][0], matrix.m[2][1], matrix.m[2][2], matrix.m[2][3]], [0.0, 0.0, 0.0, 1.0]]) hmd_pose = get_device_pose(poses, openvr.k_unTrackedDeviceIndex_Hmd) if hmd_pose: hmd_matrix_np = convert_to_numpy(hmd_pose) position = hmd_matrix_np[:3, 3] rotation = hmd_matrix_np[:3, :3] print("Headset Pose:") print("Position: ", position) print("Rotation: ", rotation)
result: Position: [-0.1273, 1.5742, 0.4805]
The text was updated successfully, but these errors were encountered:
What library are you using? AFAIK OpenVR doesn't come with Python bindings.
Also, what direction are you expecting the Z-axis to be in? OpenVR uses right-handed Y-up.
Sorry, something went wrong.
No branches or pull requests
when i run this,the z-coordinate of the positioning data is in the second position, and there is clearly an issue. Why is this?
code:
result:
Position: [-0.1273, 1.5742, 0.4805]
The text was updated successfully, but these errors were encountered: