Summary
In this chapter, we enhanced the instance selection methods in the code for better handling of finding the selected instance on the screen. Plus, we added the ability to select an instance by using the mouse. First, we implemented a button to center our virtual camera on the selected instance. Next, we added the ability to highlight the selected model, making it easier to spot on the screen. Then, we implemented a visual selection, allowing the user to select an instance by clicking on any instance with the mouse. Finally, we created the possibility to select no instance at all, avoiding accidental changes.
In the next chapter, we will lay some groundwork to adapt more game engine features to the model viewer. As well as splitting the behavior of the viewer into an edit mode and a pure viewer functionality, we will add the ability to revert ongoing changes to an instance. At the end of the next chapter, we will implement undo/redo functionality, allowing the user to revert...