Posts

Showing posts from March, 2021

Improve Annoying Jump Controls With Coyote Time and Jump Buffering - Unit Game development Tutorial

Image
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

Getting Started with Character Animation Using Mixamo - Unity Game Development Tutorial

Image
In this Unity game development tutorial we're going to look at a way to get started with character animation, that will work even if you have very little animation experience. You can either watch the video version below or continue reading for written instructions. We're going to start with a basic scene containing a plane representing the ground. What we're going to look at is a really simple way to add an animated character to this scene. In general, if you wanted to create your own character animations, you would need to use 3D animation software, such as Blender. This is another skill to learn and can really slow down indie game developers who maybe don't have a team of artists and animators to help them out. Another option is to use this excellent tool from Adobe, called Mixamo. Mixamo is a library containing thousands of character animations, and best of all, it's completely free! All you need to do is sign up for a free account at Mixamo.com and sign

Making a Character Jump When a Button is Pressed - Unity Game Development Tutorial

Image
In this Unity game development tutorial we're going to look at how we can make a character jump when a button is pressed. 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.  The character has a Character Controller component attached, that is used to move the character around and handle collisions with the obstacles. We've also set up a Cinemachine camera to follow our character around. We created this scene in our 'Follow Camera' tutorial, so take a look if you want to know how it was done. Let's double click on the PlayerMovement script and have a look at the current state of our script. using UnityEngine; public class PlayerMovement : MonoBehaviour { public float speed; public float rotationSpeed; private CharacterController characterController; void Start() { characterController = GetComponent&l