This week I completed two more sets of tutorials for building Ruby's 2D Adventure. I added items such as trees, drains, metal cubes, flowers and more to my scene. To make it look like Ruby is standing in front or behind the items I changed the transparency mode in the camera settings to custom axis. I changed the sprite sort point to pivot and edited Ruby's custom pivot in the sprite editor so that the pivot is now placed at the bottom. Now it does not look as though Ruby moves in front or behind the items too early. I created a prefabs folder and added the items to it. This allowed me to easily add duplicates of the items to my scene.
I added a RigidBody component to Ruby and changed the gravity scale to 0 to prevent her from falling out of the screen. I added a box collider to Ruby and the items, and adjusted the sizes. To stop Ruby from glitching and rotating when coming in contact with an item, I activated the freeze rotation in the RigidBody component and edited the RubyController script. I added a TileMap collider then changed the collider type of all the "land" tiles to none so that Ruby stops at the border when she tries to walk onto the water tiles.
Comments
Post a Comment