Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity 5.x 2D Game Development Blueprints

You're reading from   Unity 5.x 2D Game Development Blueprints Explore the features of Unity 5 for 2D game development by building three amazing game projects

Arrow left icon
Product type Paperback
Published in Sep 2016
Publisher Packt
ISBN-13 9781784393106
Length 252 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Francesco Sapio Francesco Sapio
Author Profile Icon Francesco Sapio
Francesco Sapio
Abdelrahman Elsayegh Abdelrahman Elsayegh
Author Profile Icon Abdelrahman Elsayegh
Abdelrahman Elsayegh
Arrow right icon
View More author details
Toc

Building a cool level

Now that we have the character fully animated and controllable, it's time to build a cool level to let him move in. In order to organize the level, we can follow these steps:

  1. Delete both Floor_1 and Floor game objects (since we start from scratch).
  2. Create two new objects, Level and Floors_1. Reset their position (all zeros) and scale (all ones).
  3. Create a Floor_1 game object from the tile we want to use. Furthermore, set its scale to (2.15,2,1). Finally, add a Box Collider 2D.
  4. Parent them to each other in the following order: Floor | Floors_1 | Floor_1, as shown in the following image:

    Building a cool level

    This is what the Inspector should look like:

    Building a cool level

  5. Add the component PlatformEffector2D to the object Floor_1. To easily find it, you can use the search tool or navigate to Component | Physics 2D.
  6. Check the Used By Effector variable in the collider to True.
  7. Change the PlatformEffector2D component to match the following image:

    Building a cool level

  8. In the Box Collider 2D component of Floor_1, use Slippery as the...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime