wgpu-openxr-example icon indicating copy to clipboard operation
wgpu-openxr-example copied to clipboard

Figure out what's going on with the coordinate space

Open philpax opened this issue 1 year ago • 0 comments

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.

philpax avatar Oct 16 '22 04:10 philpax