mrcendre / motion

A Flutter plugin to apply a gyroscope-based motion effect to widgets.
GNU General Public License v3.0
39 stars 15 forks source link

Tilt & Hold Position? Or Tilt to Pan? #8

Closed jtkeyva closed 1 year ago

jtkeyva commented 2 years ago

Hi, wondering if it's possible that when you tilt and keep it tilted that the position stays until you tilt it back to origin? This could be fun to be able to peek behind things or pan around a widget.

mrcendre commented 1 year ago

Hi @jtkeyva, thanks for your suggestion !

As of version 1.4.0, you can specify a null damping factor to your MotionController.

This will disable the tilt-back effect, thus achieving what you're looking for.

jtkeyva commented 1 year ago

Awesome thanks! Can't wait to try it out :)

jtkeyva commented 1 year ago

The example app isn't asking Safari iOS for permission to use gyroscope. https://cendre.me/motion_example/#/ asks for permission but not the example included on pub.dev...