How to flip a matrix across one axis?

Recommended Posts

SteveDeFacto    109
I have some geometry that I need to flip across the x axis using a 4x4 matrix but when I scale it by -1 it flips my polygons inside out and it also cases me other problems with using the matrix to place an body in bullet. I'm really confused about how to solve this problem?

Share on other sites
SteveDeFacto    109
Actually I believe my problem is with the projection matrix I'm using. How can I flip my screen horizontally through the projection matrix?

Share on other sites
Hodgman    51234
[quote name='SteveDeFacto' timestamp='1312792801' post='4846104']when I scale it by -1 it flips my polygons inside out[/quote]That's a side effect of flipping geometry -- the vertex winding order will become the opposite of what it used to be -- it's to be expected.

How are you performing this scaling operation?

Share on other sites
SteveDeFacto    109
[quote name='Hodgman' timestamp='1312794191' post='4846107']
[quote name='SteveDeFacto' timestamp='1312792801' post='4846104']when I scale it by -1 it flips my polygons inside out[/quote]That's a side effect of flipping geometry -- the vertex winding order will become the opposite of what it used to be -- it's to be expected.

How are you performing this scaling operation?
[/quote]

The problem was the projection matrix and I fixed it! =D