【问题标题】:What Units is Input.acceleration in for Unity?Unity 的 Input.acceleration 是什么单位?
【发布时间】:2017-03-25 17:46:53
【问题描述】:

Time.deltaTime 等也是如此...它们是否都标准化为 m/s^2 和 s。 下面的代码会遇到单元错误,还是可以正常工作?

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

    tm_dta += Time.deltaTime;
}

【问题讨论】:

  • 我认为它和unity的单位是同一个单位。这意味着如果一个单位代表1米,那就是1m/s^2

标签: c# unity3d


【解决方案1】:

是的,它们都标准化为 m/s^2 和 s。 然而,对于距离,一个单位真的可以是你想要的任何东西。见链接:http://answers.unity3d.com/questions/45892/unity-unit-scale.html

Time.deltaTime 以秒为单位:https://docs.unity3d.com/ScriptReference/Time-deltaTime.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-03
    • 2013-07-24
    • 2016-09-08
    • 1970-01-01
    • 1970-01-01
    • 2013-12-07
    • 1970-01-01
    相关资源
    最近更新 更多