Return only Accel values #4060
Replies: 1 comment
-
Posted at 2022-08-11 by psc1988 Got it. Posted at 2022-08-11 by psc1988
Posted at 2022-08-11 by psc1988 But I have another question. Any idea how I can get x/y starting at 0 with a non sensitive movement tracking? I would like to use the Puck.js as a Joystick. Best regards Posted at 2022-08-11 by @gfwilliams To get the value from 0, you need to subtract a 'base' value. For instance you could do:
If you want to stop the values moving so fast, you can do an average:
You can change values to get a slower movement but they must always add up to 1, so 0.9/0.1 or 0.8/0.2(faster) or 0.95/0.05(slower) Posted at 2022-08-11 by psc1988 Awesome, thank you Gordon! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-08-11 by psc1988
Hi,
I saw the documentation about the built in accelerometer/gyroscope.
How I can return only the x/y values of the accelermoter, starting at 0?
Best regards
Beta Was this translation helpful? Give feedback.
All reactions