Posts

Showing posts from May, 2021

Using Terrain Tools to Create 3D Landscapes - Unity Game Development Tutorial

Image
In this Unity tutorial we're going to look at how we can use the Unity Terrain tool to easily create landscapes in our game. We’ll look at how to sculpt the Terrain, how to add textures, and how we can add scenery, such as trees and flowers.

Rotating in the Direction of Movement 2D - Unity Game Development Tutorial

Image
In this Unity tutorial we're going to look at how we can rotate a 2D object so that it faces the direction it’s moving in.

How to Use Lerp - Unity Game Development Tutorial

Image
In this Unity game development tutorial we're going to look at the mathematical function Lerp, or linear interpolation. The Lerp function allows us to linearly interpolate between two values, and is most commonly used for changing values over a period of time.  While its usage is really common in Unity, it's quite often misunderstood, and can easily be used in the wrong way. In this tutorial, we'll demonstrate how to use it correctly, and hopefully clear up any confusion. You can either watch the video version below or continue reading for written instructions. OK, we're going to start with this scene that has a single cube. We're going to add a script to this cube to move it from its starting position to a desired destination over a period of time. We'll select the cube in the Hierarchy. Then we’ll click on Add Component and add a new script.  We'll call this script LerpMovement. Before we update our script, let's have a look at the Unity docum...