Search Unity

Identifying a stop in acceleration

Discussion in 'Android' started by Section-One, Jan 7, 2018.

  1. Section-One

    Section-One

    Joined:
    Sep 8, 2014
    Posts:
    81
    Hi,

    I'm using Input.gyro.userAcceleration and when I start moving my phone along 1 axis I get certain values, and when I stop moving it, I am getting the reverse values before I get a 0 value.

    How can I identify that it's a stop and not movement in the opposite direction?

    Thank you.