webxr-input-profiles icon indicating copy to clipboard operation
webxr-input-profiles copied to clipboard

Should add targetRaySpace offset in Profiles Registry?

Open daoshengmu opened this issue 4 years ago • 0 comments

When implementing targetRaySpace and gripSpace in XRInputSource, I notice Oculus and OpenVR only provide a pose matrix for both controllers. I assume the pose matrix means gripSpace for most of controllers. If so, there is no other information about targetRaySpace from the existing device APIs. In that case, if a browser engine doesn't hardcode to calculate offset values based on gripSpace to get targetRaySpace, that would not possible. Then, it will make UAs have different result for targetRaySpace in controllers, and it will cause Web compat issues.

I am thinking if it makes sense for profiles provide offset value to describe how position and orientation values of targetRaySpace in XRInputSource need to be changed. If this device API already has an API for getting targetRaySpace, the offset can be zero. On the other hand, we can make targetRaySpace has the same value with gripSpace in a browser engine. Then, using the offset value from profiles to transform the current targetRaySpace and give proper result to users.

daoshengmu avatar Mar 13 '20 21:03 daoshengmu