Gyro Rotation of Background gif

I want to create a sunlight-to-glass rotational effect with a background gif that provides the right shading. I have the gif, I just don’t know how to use gyro with acceleration to create a rotational effect. I’ve searched and read the community boards and didn’t find anything close to what I am trying to achieve. Can this be done with Facer (help!)?

1 Like

Thank you! Initial try did not produce results, so I will have to experiment with it a bit. I have an Asus Z2 and t should have the capability to do as imagined. Thanks again!

My codes were designed to work with a static image, not a gif.
I’m not sure if Facer can use gifs at all…

I misspoke; actually a jpg, but same concept. Yes, the code worked but I’ll need to work with it to smooth it out (perhaps related to Raw vs non-Raw data). Thanks again for the help!

Raw mean straight from the sensor.
Non-raw takes starting position as 0.
(I believe that’s the case).

The smoothness depends only on how a watch is working at a moment (how many other things are on screen and are running in the background).

@Mellin,
thanx for the provided link, but for some reason, this solution did not work for me at all.

However, after a while of trial and error, I found a formula that does the trick for me. I know, it’s far from perfect, and I have to admit - I don’t even quite know what I’m doing here :slight_smile: - but the results are quite satisfying for me.
With (floor(clamp(((accelerometerY())*80), -560, 570)/(2*pi))) I get values from -90 to +90. (used for the background)

Update: After I just learned, that accelerometerY() outputs -10 to +10 (floor(clamp(((accelerometerY())*9), -90, 90))) should translate the output in degrees directly. (used for the glare).
You decide which rotational rate you like more, as these two formulas produce different accelerations, but equal maximum values.

Here is a quick mockup if you wanna see the outcome: