Flip D3DX Sprite

Loki

Newcomer
Joined
Dec 27, 2003
Messages
15
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.
 
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,
 
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?
 
Back
Top