The main UI element of our puzzle game is the animated 3D image selector. In this recipe, we show you how to render the animated carousel-like selector and interact with the user.
Before proceeding with this recipe, you may need to go back to Chapter 7, Cross-platform UI and Input System, and read how the
Canvas class works. A bit of mathematics will be required to understand better how the code in this recipe works.
The idea behind the rendering is quite simple. We let the individual quads move in a way that their corners slide along four guiding curves. The following figure shows the same quad in a series of positions:
The four curves show the paths of the quad's corners.