Look into how WinUI buttons act like WP buttons and rotate/transform toward the mouse when pressed.
Hopefully I can figure that technique out to implement it into Retiled for a more authentic experience. It's kinda weird not having the buttons rotate/transform toward the mouse and instead just go inward.
Found a repo with Microsoft's Windows Phone samples, one of which is the Tilt Effect that I was looking for: https://github.com/microsoftarchive/WindowsPhoneToolkit/blob/master/Microsoft.Phone.Controls.Toolkit/Effects/TiltEffect.cs
If that repo goes down, I forked it: https://github.com/DrewNaylor/WindowsPhoneToolkit/blob/master/Microsoft.Phone.Controls.Toolkit/Effects/TiltEffect.cs
MSDN has two pages on this effect, one being how to use it: How to use the control tilt effect: https://docs.microsoft.com/en-us/previous-versions/windows/apps/ff941108(v=vs.105) About the tilt effect in general: https://docs.microsoft.com/en-us/previous-versions/windows/apps/ff941094(v=vs.105)
Note that the WindowsPhoneToolkit repo is under the Ms-PL, so I can't use it in anything with the GPL. Should be fine in here beside LGPL components, though. That being said, I can't use this code directly (or even translated into a different dialect of XAML), but at best I can use the values provided in the sample file. The techniques could probably be converted into QML, too.
Found a video that shows how to rotate rectangles about the x, y, and z axes, and it may be useful if I also ensure there are limits when I get the "cursor" position to calculate the proper angle and other values: https://youtu.be/frC9nZGrLAM
I think it's mostly good now after implementing the deadzone the Metro-UI-CSS has, just need the delay when returning from tilt as mentioned in #153.
This will stay open until it's possible to press down on a button and have it rotate anywhere like an analog stick instead of an 8-way D-Pad, as that's how WP works with buttons and my method still isn't close.
The tilt project by rikschennink (https://github.com/rikschennink/tilt) has code for Metro tiles to tilt correctly anywhere on the tile in 360°, and I forked it here: https://github.com/DrewNaylor/tilt
Hopefully there's a way to use at least the math functions in it, as it's JS and under the MIT License.