mrcendre / motion

A Flutter plugin to apply a gyroscope-based motion effect to widgets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tilt & Hold Position? Or Tilt to Pan?

jtkeyva opened this issue · comments

commented

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.

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.

commented

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

commented

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...