Applying physics with RigidBody
Throughout this book, we have used colliders and trigger boxes to detect hits from a bullet or a selection made in the first rendition of our shop. We have also referred to applying a RigidBody component to some of these game objects with colliders to ensure that a collision is detected. We haven't made use of Rigidbody any other way so far. However, in this section, we are going to make more use of Rigidbody by making a collision happen – the blocks will collapse by our level3
boss game object going through them.
The following image shows the cargo art assets being smashed out of the way by applying and tweaking Rigidbody components, which is what we will achieve in this section:
Let's make a start by setting up our level3
scene with some pre-made assets:
- In the Project window, navigate to the
Assets/Scene
folder...