openvr icon indicating copy to clipboard operation
openvr copied to clipboard

Why is the driver pose different from the application pose?

Open 2621690255 opened this issue 1 year ago • 1 comments

For example, I have a position(1.0f, 2.0f, 3.0f) and a rotation (0.948324f, 0.317305f, 0.0f, 0.0f), Rotate around the x-axis by 30 degrees.

vr::DriverPose_t outPose;
outPose.vecPosition[0] = 1.0;
outPose.vecPosition[1] = 2.0;
outPose.vecPosition[2] = 3.0;
outPose.qRotation = { 0.948324f, 0.317305f, 0.0f, 0.0f };

outPose.qWorldFromDriverRotation = { 1.0f, 0.0f, 0.0f, 0.0f };
outPose.qDriverFromHeadRotation = { 1.0f, 0.0f, 0.0f, 0.0f };
outPose.poseIsValid = true;
outPose.deviceIsConnected = true;
outPose.result = vr::TrackingResult_Running_OK;
outPose.shouldApplyHeadModel = true;
// update pose to steamvr

In unity, I will get this result (1.0f, 2.024904f, 3.087058f) and a rotation (0.948324f, 0.317305f, 0.0f, 0.0f). image

2621690255 avatar Jun 11 '24 10:06 2621690255

Perhaps you should take a look at the Unity-related code. In UE4, UE4 retrieves the position from SteamVR and performs some transformations. Additionally, the repositioning is also handled by UE4, which is why the final position displayed differs from the position reported by SteamVR.

fww0071215 avatar Jan 15 '25 01:01 fww0071215