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...
In this Unity tutorial we're going to use NavMesh pathfinding on a procedurally generated level. Using a randomly generated maze, we’ll have an agent be able to find the quickest route from one end to the other.
In this Unity game development tutorial we're going to look at how we can configure our camera, so that it automatically adjusts the view when the line of sight to our character is blocked. You can either watch the video version below or continue reading for written instructions. OK, we'll start with this scene that has a character and some obstacles. We've currently got a Cinemachine virtual camera that follows the character around, but at the moment, if we move behind the wall, our view is blocked. We're now going to use another component of Cinemachine to prevent the view from being blocked. We'll click on the Extensions dropdown and select Cinemachine Collider. This adds a component that will check if the view to the target is blocked and will automatically try to resolve it. There are a few strategies for how it tries to do this. The default strategy is 'Preserve Camera Height', which will attempt to change the view while staying at the origi...
Comments
Post a Comment