Skip to content

Commit

Permalink
Fix incorrect axes/orientation for Crystal eye tracking.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbucchia committed Jun 16, 2023
1 parent 4c43b58 commit f77276a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pimax-openxr/eye_tracking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ namespace pimax_openxr {
atan((state.GazeTan[xr::StereoView::Left].y + state.GazeTan[xr::StereoView::Right].y) / 2.f);

// Use polar coordinates to create a unit vector.
unitVector = {cos(angleHorizontal) * cos(angleVertical),
sin(angleHorizontal) * cos(angleVertical),
sin(angleVertical)};
unitVector = {
sin(angleHorizontal) * cos(angleVertical),
-sin(angleVertical),
-cos(angleHorizontal) * cos(angleVertical),
};

sampleTime = state.TimeInSeconds;

Expand Down

0 comments on commit f77276a

Please sign in to comment.