Closed cyrozap closed 1 year ago
I do not have a Steam Deck so I cannot test what the orientation for the Steam Deck gyro axes are. I am not familiar with any references (outside of this project) either. All actions should be using the same orientation system as the original Steam Controller. Going to have to edit the driver module and invert the roll there. Will edit that later.
Got the change submitted
Thanks, I'll try to test those changes (1737c41c49e405c18b91a2e27bcb3d821bdae606 and a2cc56584e6e74bee8ef14cabaa0e26129a426dc) this weekend and report the results.
I think the issue is with the difference in orientations relative to the screen between the Steam Controller and the Steam Deck's controller. That is to say, the Steam Controller is usually used with the plane of the ABXY buttons perpendicular to the plane of the screen, while the Steam Deck's controller is oriented with the ABXY buttons and the screen in the same plane.
If you want to test if the issue is present with the original Steam Controller as well (which I might just test myself, since I have one), it's easy to encounter the issue when emulating a certain popular action-adventure game by a certain litigious video game publisher. One of the puzzles in that game involves guiding a ball through a maze, where the orientation of the maze is controlled directly by the orientation of the gamepad. This puzzle makes it very easy to debug issues with the mapping of the gyroscopic inputs, since an incorrect mapping will immediately be reflected in the mismatched orientation of the ball maze.
When using the gyroscope via sc-controller's cemuhook server, the motion doesn't appear to be mapped correctly. Specifically, the roll axis appears to be inverted.
I fixed the issue for myself with the following hack:
I assume we'll want to do the inversion earlier, though, to account for different controllers having different axis mappings/inversions. Or, maybe the gyro axis mapping/inversion could be made configurable.