What units are Input.acceleration in for Unity?

The same goes for Time.deltaTime etc. They are all standardized for m / s ^ 2 and s. Will the below code run into unit errors or work fine?

public static void update()
{
    Vector3 a = Input.acceleration;
    v = v + Time.deltaTime * a;
    s = s +  Time.deltaTime * v;

    tm_dta += Time.deltaTime;
}

      

+3


source to share


1 answer


Yes, they are all standardized to m / s ^ 2 and s. However, for distance, one unit can really be anything. See link: http://answers.unity3d.com/questions/45892/unity-unit-scale.html



The .deltaTime is in seconds: https://docs.unity3d.com/ScriptReference/Time-deltaTime.html

+2


source







All Articles