Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

  • Leaders
Posted

How did you try to flip it?

Did you try rotating it at Pi radians (180 degrees)?

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Posted

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,

Posted

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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...