Time for action – creating planks
Each of the blocks we will be creating will be largely similar:
First, we will create the plank of wood. To do this, we need another cube. Rename it
Plank_Wood
.Set the plank's Scale to
2
for the X and Y axes, and0.25
for the Z axis. Its scale on the y and z axis define its size as seen by the player. The scale on the x axis makes sure that it will be hit by other physics objects in the scene.Next, create a new material using the
plank_wood
texture and apply it to the cube.To convert this new wood plank into a physics object, add a Rigidbody component. Make sure your plank is selected, go to the menu bar of Unity and click on Component, followed by Physics; finally, click on Rigidbody.
We need to keep the plank from moving along the x axis and out of alignment with our other physics objects as well as keeping it from rotating to show its other sides to the player. To do this, we make use of the Constraints group of checkboxes on the Rigidbody component. Check...