Use gyro sensor to hide/show elements via opacity?

Hello,

I wonder if the gyro sensor can be used to show/hide elements on the watch face based on the y-axis or x-axis via the ‘Opacity’ field. Is there any smart expressions that can check on the angle of rotation (let’s say y-axis) and if true/false then shows/hides the image?

Any help or pointers are greatly appreciated…

Hello,

Following tag expression for opacity means
: hide this component when the device tilted over 45 degree to the negative angle direction in Y axis.
image

Good luck!

1 Like

Hello @sinjae. Thanks so much for the quick reply - very helpful and very much appreciated!

Hello sinjae - sorry for the late add-on question: would it be possible to fade in this layer/component if:

[ACC_A_Y] < 45?

Please let me know and thanks again…

if you want to make a fade in/out animation, you’d better to use the GYRO effect WFS supports.

After adjust some value in the GYRO inspector,
you can check how it works with GYRO emulator in RUN panel.
image

Hello sinjae - that is a wonderful solution! Thank you so much for your fast reply :wink:

Hello @sinjae - sorry for another question - I am running into an issue since I like to hide the layer by default (opacity: 0) and only show it when the watch is tilted towards the user at maybe 35 degrees.

Somehow I can get this to work - if you have any pointers that would be greatly appreciated…

The GYRO effect does not seem to support starting the component in a hidden state…
image
This expression makes visible state when device is tilted a lot in both directions.
If you want fade in/out animation for this, you can make own calculation instead of the value, 100.
Cheers :slight_smile:

1 Like

Thanks a zillion sinjae! Let me try to fiddle with this one a little…