Bob
Bob

Reputation: 1396

OpenGL: Flipping an Item

I've created a "Polyman" and a "Polywoman". The polyman walks from the right to the middle of the screen while the polywoman walks from the left to the middle of the screen.

I used all the same points for polyman and polywoman including the feet, meaning polywoman's feet are pointed in the wrong direction, is there a way I can simply flip polywoman 180% on the z axis to make her feet point in the right direction, or am I doomed to create her own feet?

I know creating new feet wouldn't take very long, but gaining the knowledge of how to flip an icon will greatly further my abilities in future assignments.

Upvotes: 0

Views: 512

Answers (1)

Jupiter
Jupiter

Reputation: 1502

Assuming (from your title) that you're working with raw OpenGL, just use a different model matrix when drawing PolyWoman that scales her in the x direction with a factor of -1;

Upvotes: 1

Related Questions