wgpu-openxr-example
wgpu-openxr-example copied to clipboard
Figure out what's going on with the coordinate space
I've bodged the transform from OpenXR space to wgpu space:
let xr_rotation = {
let o = pose.orientation;
Quat::from_rotation_x(180.0f32.to_radians()) * glam::quat(o.w, o.z, o.y, o.x)
};
let xr_translation = glam::vec3(-pose.position.x, pose.position.y, -pose.position.z);
This is very much trial and error and not based in any kind of well-understood transformation. Getting to the bottom of this would be ideal.