Back with another tutorial! This time, i'm gonna show you how to make 2D Areas. Although 2D Areas were in Super Mario Galaxy, they are never actually used in this game. found out how to replicate this "effect" from SMG, and it's quite cool actually. I always loved it when 3D Mario games went 2D, like the Super Mario Sunshine file select, and a few levels in Galaxy.
But enough about that, here's how to do it
HOW TO CREATE 2D AREAS
Step 1: 2D Camera
First of all, add a CameraArea to your level.
Then, you must click on "Generate Camera Code", a prompt will appear, asking you what the distance, horizontal rotation, and vertical rotation should be. For the horizontal rotation, put 0 (this depends which direction Mario is supposed to go). For the vertical rotation, put 5 (rises the camera slightly), and for the distance, 1100 is good enough for me.
Once you generate the camera, everything should be good! Of course, test your level to make sure your camera works correctly, and make sure the CameraArea fills the desired space.
Step 2: 2D Area
Once you are done adding the camera, add two transparent walls near your desired 2D Area. They should be an equal distance away from the middle, enough for Mario to squeeze through. Only the front side of this object has collision, to keep that in mind. Make sure Mario can not get to the other side of the transparent walls by any means necessary.
After this, you will want to duplicate the transparent walls and make enough so that they cover the entire 2D section on both sides. Unfortunately, you can not simply upscale the transparent wall object as this will cause glitches.
Finally, decide on the distance you want Mario to be able to travel back and forth. This involves moving the transparent walls to be closer together or farther apart. In some 2D areas, Mario can travel slightly back and forth, but in others, Mario is locked strictly to the 2D perspective.
And you're done, make sure to test out your edits in game to make sure everything worked right.
This is what the end result should look like:
Got any questions? Ask away. Did I miss something? Let me know.