

Our collider should have already been setup to fit our square player so we can now move on. For our box collider we just keep it standard. Also take note that the constraints are freezing rotation on the z-axis so that our player does not fall over. I then made the gravity scale to 4 so that our player can fall quite quickly. I have set my Player mass to 0.1 and removed all angular and linear drag. See below how mine is setup then I will just highlight what was changed. We want to set some settings on our Rigidbody so that we can have some realistic cartoony physics. To do that click on add component and add the RigidBody2D and add the BoxCollider2D. For that we need to add a RigidBody2D and a BoxCollider2D. We want to add a few things now to our player so that we can detect some collisions and control our player. Let’s now bring our player into our scene by dragging our player sprite into our scene. We will also be creating some squares for our platforms. First we want to create a square for our player. Great so next we want to setup some basic shapes and their properties.

Unity2D platformer create folders for project You can do that by right clicking in the folder panel and then create the following folder structure for your project. We firstly need to add some folders to our project. We will need a few things to setup our scene. Unity 2d platformer movement controller tutorial Setting up our 2d platformer scene We also will do some ray casting debugging to make sure we can see how our raycasts are detecting collisions. Setup physics correctly so that we have a more cartoony type physics. We will also use cinemachine to allow for a camera follow of our player. Here is what you should have at the end of this tutorial. We will setup some basic platforms and a player in typical prototype mode, which you can use to add your own graphics to later on to create your platformer. In this tutorial we will build a basic project where you can have a unity 2d platformer where you can do normal jumps and wall jumps.
