unity3d学习j记录之 API阅读-002Time.deltaTime
来源:互联网 发布:中科院物理所考研知乎 编辑:程序博客网 时间:2024/05/29 03:01
Time.deltaTime
Description 描述
The time in seconds it took to complete the last frame (Read Only).完成最后一帧所需的时间(只读)。
Use this function to make your game frame rate independent.使用此功能可以使您的游戏帧速率独立。
If you add or subtract to a value every frame chances are you should multiply with Time.deltaTime. When you multiply with Time.deltaTime you essentially express: I want to move this object 10 meters per second instead of 10 meters per frame.
如果您在每一帧添加或减去一个值,您应该与Time.deltaTime相乘。当您乘以Time.deltaTime您本质上表达:我想移动这个对象每秒10米,而不是每帧10米。
When called from inside MonoBehaviour's FixedUpdate, returns the fixed framerate delta time.
调用时,返回固定的帧速率增量时间。
Note that you should not rely on Time.deltaTime from inside OnGUI since OnGUI can be called multiple times per frame and deltaTime would hold the same value each call, until next frame where it would be updated again.注意,您不应该依赖OnGUI中的Time.deltaTime,因为OnGUI可以每帧调用多次,deltaTime将保持每个调用相同的值,直到下一帧再次被更新。
public class ExampleClass : MonoBehaviour { void Update() { float translation = Time.deltaTime * 10; transform.Translate(0, 0, translation); }}
- unity3d学习j记录之 API阅读-002Time.deltaTime
- unity3d学习j记录之 API阅读-001Input.GetAxis
- Unity3D:Time.deltaTime
- Time::deltaTime
- Time.deltaTime
- Time类里面time、deltaTime、fixedTime、fixedDeltatime的区别(Unity3d)
- Time.deltaTime 增量时间
- Unity Time.deltaTime
- Time.deltaTime 增量时间
- 面向组件编程之Unity 9.计时器 关键字:Time,Time.deltatime
- 对Time.deltaTime的理解
- C# Time.deltaTime 增量时间
- Time.deltaTime 的含义用法
- Unity3D 为什么Transform.Translate 中的x/y/z值经常会通过speed * Time.deltaTime获取?应该这样的
- Unity3D学习记录——API Invoke函数
- Unity3D学习记录——API SendMessage函数
- Unity3D学习记录——API IEnumerator(协同程序)
- Unity3D学习记录——API工具类1
- C# 排列组合
- uva 10655 公式变形 矩阵快速幂
- Git 记录:git checkout HEAD -- FILENAME
- Java命名规范
- 算法二十三
- unity3d学习j记录之 API阅读-002Time.deltaTime
- 【Java多线程】线程的安全性
- 在ncnn上把玩mobileNet
- String Date Calendar之间的转换
- Invalid location of tag
- 30-SpringBoot——核心-企业级开发-Spring Security
- LabVIEW里的事件结构和文本语言里的回调函数
- 2017.9.7 翻硬币 失败总结
- PHP中sort()函数的参数SORT_LOCALE_STRING具体有什么用?