Lets say sprites are defined by an x/y position and a width/height. How can I make the sprites flip on any axis as if they are 3D like in this online example or in this screenshot? The rotation should be performed from the perspective of a camera looking dead center at the sprite regardless of where the sprite is on screen.
I'm currently displaying the sprites using an orthogonal matrix.
This seems like it should be a solved problem. Bonus points if there is a way to make this work with an arbitrary rotation matrix.