« Blog


How to climb stairs as a Rigidbody (in Unity3D)

So you want to add some stairs to your game? Great! Adding stairs in level design adds more vertical variety to your levels. Or perhaps your game is based on stairs (Stair Climbing Simulator 2018?).

In this tutorial I'll show you how to implement stair climbing from scratch in Unity3D if you're using a Rigidbody as your player. Before we get to coding, you should consider your (much easier / less work) alternatives:

  1. Use a CharacterController. It already has some support for this, but can't have physics applied willy nilly, nor is it as customizable as a Rigidbody with multiple colliders.
  1. Use a CapsuleCollider with your Rigidbody. If you get the player going fast enough they can just ram right over the stairs.
  1. Use ramps or stairs with invisible ramps over the steps. They work just as well and even provide a smooth transition surface. Doesn't work for cases of dynamic/physics content or player generated content.
Read More »

Extracting a .unitypackage without Unity3D

It looks like all the libraries that currently exist to extract .unitypackage files are broken/don't exist anymore (or at least the ones on Unity Answers). So I made a new one in Python.

Download unitypackage_extractor on GitHub

It's also on pypi in case anyone might want to use it in some sort of automated workflow.

While Unity packages are just a .tar.gz, they have a special file structure that doesn't make them usable after extracting right away. Every file and it's data is broken up over multiple files and stored in specific folders. This script just rebuilds the original heirarchy from those files.

Read More »