Fixing a jittery camera in Unity
Screenshot from Cobalt Blue, a game currently in development.

Fix jittery camera movement in Unity with Rigidbody Interpolate

If you’ve got a player character in your game that derives its movement from a Rigidbody or Rigidbody2D component in Unity, and you write a script to make your camera follow it, you will likely see jittering in your camera movement.

Here’s an example:

Camera jitter in Unity
It’s not very noticeable if you don’t move at high speeds.
Continue reading
Animator does not contain a definition for SetBool

Unity C# error: Animator does not contain a definition for ‘SetBool’

Recently, I came across an error that was quite the head-scratcher while grading some Unity scripts. Here’s what the error says:

Animator does not contain a defintion for 'SetBool'
The myAnim variable was set with myAnim = GetComponent<Animator>() earlier on.

But SetBool() is a valid method in the Animator component from Unity, so what exactly is going on here?

Continue reading
Creating a Farming RPG (like Harvest Moon) in Unity — Part 7: Growing and Harvesting Crops

Creating a Farming RPG (like Harvest Moon) in Unity — Part 7: Growing and Harvesting Crops

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Ever wanted to create a game like Harvest Moon in Unity? Check out Part 7 of our guide here, where we go through how to grow and harvest crops. You can also find Part 6 of our guide here, where we went through how to create an in-game time management system.

A link to a package containing the project files up to Part 7 of this tutorial series can also be found at the end of this article, exclusive to Patreon supporters only.

Continue reading
Creating a Farming RPG (like Harvest Moon) in Unity — Part 6: Managing In-Game Time

Creating a Farming RPG (like Harvest Moon) in Unity — Part 6: Managing In-Game Time

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Ever wanted to create a game like Harvest Moon in Unity? Check out Part 6 of our guide here, where we go through how to set up a day-night cycle and manage in-game time. You can also find Part 5 of our guide here, where we went through how to create an item equipping system.

Continue reading
Creating a Farming RPG in Unity - Part 5: Equipping Items

Creating a Farming RPG (like Harvest Moon) in Unity — Part 5: Equipping Items

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Ever wanted to create a game like Harvest Moon in Unity? Check out Part 5 of our guide here, where we go through how to equip and unequip items. You can also find Part 4 of our guide here, where we went through how to create an item management system.

Continue reading
Creating a Farming RPG in Unity - Part 4: Item Management

Creating a Farming RPG (like Harvest Moon) in Unity — Part 4: Item Management

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Ever wanted to create a game like Harvest Moon in Unity? Check out Part 4 of our guide here, where we go through how to create an item management system. You can also find Part 3 of our guide here, where we went through how to set up farmland elements that our player character will interact with.

Continue reading
Creating a farming RPG in Unity - Part 3: Farmland Interaction

Creating a Farming RPG (like Harvest Moon) in Unity — Part 3: Farmland Interaction

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Correction: In the video, we made a reference to the PlayerController component in the PlayerInteraction class. However, we later found that we didn’t make use of it at least in this part, so you can choose to skip that bit in the video for now, as it is redundant. They are highlighted in red in the finalised codes below.

Ever wanted to create a game like Harvest Moon in Unity? This is Part 3 of our guide, where we go through how to set up farmland elements that our player character will interact with. You can also find Part 2 of our guide here, where we went through how to set up our player camera.

Continue reading
Creating a farming RPG in Unity - Part 2: Basic Camera

Creating a Farming RPG (like Harvest Moon) in Unity — Part 2: Basic Camera

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Ever wanted to create a game like Harvest Moon in Unity? Check out Part 2 of our guide here, where we go through how to create a camera that follows our player character around. You can also find Part 1 of our guide here, where we went through how to set up our player character.

Continue reading
Creating a farming RPG in Unity - Part 1: Movement

Creating a Farming RPG (like Harvest Moon) in Unity — Part 1: Movement

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Ever wanted to create a game like Harvest Moon in Unity? Check out Part 1 of our guide here, where we go through how to create animations and movement for the player character.

Continue reading