Techshop

Unity Tutorial 20 - Walls


There will be a minor problem that may be obvious with the current game though?

Coins can fall off the side.

Shall we add some edges to the machine so it doesn't happen? Using the floor object as a base?

I created a "left-side" and a "right-side" object. With the grid spacing set to 0.5

I moved them into position like so

However, they are a little too in the way now. So I'm going to create a material that is mostly transparent. A kind of plastic/glass like material.

The material I created was called 'glass' with the following settings…

Basically setting the "Rendering mode" to "Transparent" and adjusting the "Albedo" colour so the "A" (Alpha) colour is fairly low, to give it the transparency.

Applying this to the walls, through ProBuilder, is enough (Material Editor), there may be the odd bug where you have to directly drag the material onto the object in the Hierarchy or the Scene view. ProBuilder sometimes is still trying to apply multiple materials and not working correctly.

You can play with the colour and smoothness options to change how it looks. There also things you can add like a normal map, height map, detail mask, to give it a rough surface, make it look a little worn, a little more realistic, if so desired, but the main goal here is to just not have it obstruct the view.

This leaves me with

I also pulled the front of the walls over the darker 'collection' point, so the coins don't spill there either.

GIT TAG 016_AddingWalls

Unity - A simple tutorial < Unity Tutorial 19 - Deleting Coins Unity Tutorial 21 - adding a GUI >