Unity-Time. deltTime for beginners, unity5.3.0f4 for beginners
First, you need to understand the principle:
Game images (animations) are loaded by a frame of images and are continuous. That is to say, there must be a frame image on a time node. The difference is that each frame has a different time. If each frame has a short time, that is, if the number of frames per unit of time is large ), the smoother the screen. The following is a continuous representation of the image flow, and the image width indicates the time when the image exists.
Void Update (){
GameObject. tranform. translate (new Vector3 (0, 0, 20 ));
}
In the past, when the above program was run, the Update function was called once every frame, that is, every frame of objects would move 10 MB forward.
Next we need to understand another concept: Time. deltTime:
The official explanation of unity is:
The time in seconds it took to complete the last frame (Read Only ).
The time (read-only) of the last frame in seconds ).
Use this function to make your game frame rate independent.
Use this function to make it irrelevant to the frame rate of your game.
DeltTime indicates the time when the last frame is completed, that is, the last frame of the current time node.
Void Update (){
GameObject. tranform. translate (new Vector3 (0, 0, 10) * Time. deltTime );
}