Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

nnurgle

Having trouble with new sprite transformations

This topic is 5241 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I had my code working sweet with the old sprite usage (dx8) Now that i'm porting my code to dx9, i can't get the sprites to do the same things. here is the problem, i just want the sprites to rotate around their center, and to be able to place them on the screen. So far what happens is when i pass a translation into d3dxsprite, and i can only get the sprites to rotate around the top left of the screen. I have changed the center values, and tried concatination of a translation and rotation matrix... nothing is working for me right now. any help would be great [edited by - nnurgle on April 12, 2004 2:13:51 AM]

Share this post


Link to post
Share on other sites
Advertisement
in the old interface the points may have been relative to the sprite but now you may need to calculate the sprites center point relative to the screen coordinates. im not sure if this is correct as I have never rotated the sprites

Share this post


Link to post
Share on other sites
thanks for your reply, i tried that. it didn''t work. What I had to do, is use a function to calculate the matrix. This function is part of directX, and someone else on this formum posted it.

in case anyone els has this problem, the function is called:
D3DXMatrixTransformation2D()

it works very well.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!