Rotating a Character in the Direction of Movement - Unity Game Development Tutorial
In this Unity game development tutorial we're going to look at how we can rotate an object so that it faces the direction it’s moving in. You can either watch the video version below or continue reading for written instructions. Right, let's get started by creating a new 3D project in Unity Hub. We'll add a Plane to represent our floor by clicking the plus button on the Hierarchy and selecting 3D Object->Plane. We'll set the scale of the Plane to ten on the X axis and ten on the Z axis. Next, we'll create a material to change the colour of the floor. To do this, we'll click the plus button on the Project panel and select Material. We'll name this material 'Floor'. We'll then click on the box next to Albedo in the Inspector panel, and choose a green colour. We can now drag the material on to the Plane to assign it. We now need a character to move around our scene. For this we'll head over to the Asset Store by selecting Window->A