This is part 2 of a series of tutorials for Buiding a 2D Platform Game in Unity.
An essential part of a platform game is the ability to jump. Sometimes you need to jump over barrels, onto mushroom people, or just jump up to the next platform.
In this video we…
- add a script component to our actor
- add jumping with space bar key
- tag objects as “Ground”
- use GetKeyDown
- use GetComponent(RigidBody2D)
- use Vector2
- use OnCollisionEnter2D
- add double jumping
- refactor code into a function
This tutorial builds on the first project and the GitHub tag for this tutorial is v2
- See this link about the 2 Platformer GitHub source and tags
In the next video, I will be showing how to add left/right movement.
Be sure to subscribe to the Playlist to get the future updates: Unity 5 2D Platform Game Development (Mac) Playlist