From the course: Advanced Unity: 3D Game Programming

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Updates and Delta Time

Updates and Delta Time - Unity Tutorial

From the course: Advanced Unity: 3D Game Programming

Start my 1-month free trial

Updates and Delta Time

In this video I'm going to tell you about Delta time and the update loop in Unity. The update loop is a fundamental part of modern games. All the code in the update loop runs every frame. Frames are just like frames in a film. They're static images that when displayed one after another, create the appearance of smooth movement. In this sense, we can think of our game as a film, where each frame is set up and rendered right before its displayed. The Delta in Delta time comes from the Greek letter Delta. Which is used in Mathematics to mean finite difference. So Delta time is the amount of time that's passed since the last frame, or the difference in time between two frames. Delta time is important for a number of reasons, for example, in the image we see here. We see three frames of a sphere moving up. This sphere has a speed and that speed is distance over time. But Delta time allows us to calculate the distance that sphere should move from one frame to the next. In our earlier script…

Contents