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 game development tutorial we're going to look at how we can improve our jump controls using 'Coyote Time' and 'Jump Buffering'. You can either watch the video version below or continue reading for written instructions. In one of our previous tutorials, we showed how to add a basic jump to a character. The character is only allowed to jump when they are on the ground. This makes sense logically, but in practice this can make your game really annoying to play. One problem is that the player may want to jump on landing and they press the button a fraction of a second too early. Or they may press the button a fraction of a second too late when trying to jump off a platform. In these scenarios, it just feels like the controls are broken and it can be really frustrating. In this tutorial, we'll look at how to fix this with a couple of simple changes. OK, so let's look at what’s currently happening in our script. using UnityEngine; publi...
In this Unity game development tutorial we're going to look at how we can create realistic looking terrain from real world height data. You can either watch the video version below or continue reading for written instructions. You can hand sculpt terrain using the tools in Unity, but in this tutorial we're going to look at an alternative - using images known as heightmaps. A heightmap is a grayscale image that contains height information. The darker pixels represent areas of low height and the lighter pixels represent higher areas. Below is an example of a heightmap. There are various sources online that you can get free heightmaps, but we're going to look at this one that allows you to create heightmaps of the real world - https://cs.heightmap.skydark.pl/ This resource was created for generating terrain for the game Cities Skylines but it will work just as well in Unity. Basically, it allows us to select any 18km square area on the map and then create a hei...
Comments
Post a Comment