• Create Account

### #ActualRetsu90

Posted 15 February 2012 - 02:26 PM

Try this

It doesn't work, the tiles won't show anymore when I negate X or Y.
Basically I need to do a 180° Y rotation to have the mirror effect and a 180° Z rotation to have flip effect right? But there are two questions: to have the mirror effect I need to create another square back to the front square? And to have the flip effect I need to set the center position of the current tile but how? When I try to rotate it, it takes as center coord 0, 0 that in my viewport is the top-left pixel... Basically I can set the position to -width/2 and -height/2, to place the center of the image to 0, 0 do a rotation for example of 45 degree in Z and place the model to x and y but I don't know how. I tried to multiply the transformation matrix (the one that set the center of the sprite in 0,0) with the rotation matrix and with the position matrix, but the result is likes that transformation matrix is not multiplied =\

### #2Retsu90

Posted 15 February 2012 - 02:22 PM

Try this

It doesn't work, the tiles won't show anymore when I negate X or Y.
Basically I need to do a 180° Y rotation to have the mirror effect and a 180° Z rotation to have flip effect right? But there are two questions: to have the mirror effect I need to create another square back to the front square? And to have the flip effect I need to set the center position of the current tile but how? When I try to rotate it, it takes as center coord 0, 0 that in my viewport is the top-left pixel... Basically I can set the position to -width/2 and -height/2, to place the center of the image to 0, 0 do a rotation for example of 45 degree in Z and place the model to x and y but I don't know how. I tried to multiply the transformation matrix (the one that set the center of the sprite in 0,0) with the rotation matrix with the position matrix, but the result is likes that transformation matrix is not multiplied =\

### #1Retsu90

Posted 15 February 2012 - 01:24 PM

Try this

It doesn't work, the tiles won't show anymore when I negate X or Y.
Basically I need to do a 180° Y rotation to have the mirror effect and a 180° Z rotation to have flip effect right? But there are two questions: to have the mirror effect I need to create another square back to the front square? And to have the flip effect I need to set the center position of the current tile but how? When I try to rotate it, it takes as center coord 0, 0 that in my viewport is the top-left pixel..

PARTNERS