Uploaded May 2013 | Updated November 2026, 3 hours ago
NOTE: I make an error while drawing the diagrams around the 4:00 mark, I accidentally switch to left-handed coordinates. To get counter-clockwise spinning, you need to flip the signs on the sin(theta) entries of the matrix. Lesson learned: Pay attention to whether you're in left or right handed coordinates when doing this sort of thing.
Rotating our basis vectors makes a rotation matrix that we can use to rotate the enemies when they're shot.
Find the source code here: github.com/BSVino/MathForGameDevelopers/tree/matrix-rotate
Question? Leave a comment below, or ask me on Twitter: twitter.com/VinoBS
NOTE: I make an error while drawing the diagrams around the 4:00 mark, I accidentally switch to left-handed coordinates. To get counter-clockwise spinning, you need to flip the signs on the sin(theta) entries of the matrix. Lesson learned: Pay attention to whether you're in left or right handed coordinates when doing this sort of thing.
Rotating our basis vectors makes a rotation matrix that we can use to rotate the enemies when they're shot.
Find the source code here: github.com/BSVino/MathForGameDevelopers/tree/matrix-rotate
Question? Leave a comment below, or ask me on Twitter: twitter.com/VinoBS










