Before we head on to the next part of the book, let’s take some time to complete the following exercises:
Since we’re not changing the view matrix on every frame, what could you do to optimize the updates to viewProjectionMatrix and invertedViewProjectionMatrix?
The puck currently reacts the same whether the mallet strikes it directly or on the side. Update the collision code to take the striking angle into account; Figure 43, Unit circle, might give you an idea of how to approach this.
Update the collision code so that the puck also interacts with the mallets when it’s moving on its own; for bonus points, make its motion frame-rate independent. Hint: Store your movement vector as units per second, and figure out how much time has ...