So, the final lesson in this chapter will add interaction to change the color of our material. Instead of Gaze and Gesture though, we will use a voice command:
- With LeftRect selected, click on the Add Component button.
- Scroll down and click on the New Script option.
- Type ChangeRectColor in the new script dialog; then, click on Create and then Add.
Just like last time, instead of creating a second script for the right side, we will add the same script to RightRect using the following steps:
- Select RightRect.
- Click on the Add Component button.
- Click on Scripts.
- Select ChangeRectColor from the list.
This script will be slightly more complex than the previous one. From a scripting standpoint, materials are handled by the ...