Loki Posted May 29, 2004 Posted May 29, 2004 Is there any way to flip a D3DX Sprite horizontally and vertically? I did try a .Transform with minus scaling matrix. Didn't seem to work. Any ideas would be greatly appreciated. Quote
Leaders Iceplug Posted May 30, 2004 Leaders Posted May 30, 2004 How did you try to flip it? Did you try rotating it at Pi radians (180 degrees)? Quote Iceplug, USN One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(
Loki Posted May 30, 2004 Author Posted May 30, 2004 I just tried a Scaling Matrix, the Unmanged docs for the Sprite system in DX allows more functionality than the Sprite class it seems?? Anyone have any idea/code on how to do this? Seems to be an issue everywhere I look on the net and noone has an answer. Yet how many 2D-in-3D games have no sprite flipping at all? Thanks, Quote
Loki Posted June 1, 2004 Author Posted June 1, 2004 Ok, rotating by Pi radians sort of works. Although not quite, I had to offset slightly, something like: Sprite.Transform = Matrix.RotationYawPitchRoll(Math.PI - 0.0001F, 0.0F, 0.0F) Which seems to work, but now the sprites do not appear in the order you call Draw in, the slight modification of PI to force it to draw seems to be causing all flipped sprites to "go to the back". Any ideas? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.