In another recipe, we use Grabbables and Joints to make a car’s doors openable (see Car Door with Behaviour Model). This approach is not as great for the trunk, however, as most trunks are automated and open with a click. In this recipe, we’ll create Unity animations that automatically open and close the rear door.
Setup
Make sure to follow the setup steps in Car Door with Behaviour Model to ready the prefab.
Add a “Trunk Lid” Motive Scene Object to the Trunk_Lid node in the car prefab.
Create the Animations
This document assumes you have a basic understanding of Unity’s animation system and can create simple animations. This is a good starting point if not:
...