Daily progression — A More Solid Player Foundation.
With all of the various player states sliced and prepared, we’re ready to create an actual Player object!
First, we’ll grab the first player frame and drag it into the scene.
We can’t see the player sprite because the environment is set to various layer orders from 0 to 30, we’ll put our player sprite on layer order 50 so it appears above everything else.
In the past, we’de place a box collider2d and rigidbody2d onto the sprite, but we want to be a lot more organized on how we manage our objects. We’ll create an empty either through the heirarchy or press ctrl-shift-n, and call that Player. Be sure it’s zeroed out.
Now rename the sprite we dragged into the scene as Sprite, and drag it inside of the Player empty and 0 it out (click on the three dotted menu in the window and select “reset”.
You can then move the parent empty up a little onto the platform.
Now you can attach a Rigidbody2D and BoxCollider2D to the Parent Player empty! Be sure to adjust the box collider so it fits around the player sprite.
We now have the foundation of a more clean well designed player object. Tomorrow we’ll get the initial controls in.