Besides the visual and sound effects, we also want to interact physically with our environment. This is the reason why we are going to learn how to use the interactables object, which can be dynamically moved around the map.
Physics
2D Game Kit
We are now going to add a pushable box to our level, which can be used for the following purposes:
- As a floating platform:
- To maintain the pressure on a pressure pad:
- As pushable boxes for puzzles:
- As an environmental weapon that can be used against enemies:
In order to do this, we have to head to 2DAssets | Prefabs | Interactables and add the pushable box. This box has the Pushable (Script), which will allows us to move the box from one place to another.
It will also automatically...