Jump to content
  • Advertisement
Sign in to follow this  
EnochDagor

Flat Sprite

This topic is 4508 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 want to tell my Sprite object to lay flat... oVecCenter = New Vector3(16, 16, 0) oVecPos = New Vector3(0, 0, 0) oSprite.Draw(oTex, System.Drawing.Rectangle.Empty, oVecCenter, oVecPos, System.Drawing.Color.Red) Now, instead of rendering from 0, 32, 0 to 32, 0, 0 I want it to render from 0, 0, 32 to 32, 0, 0 Understand? In other words, I want it to lay flat along the X-Z Plane. How do I do that? -E

Share this post


Link to post
Share on other sites
Advertisement
You will need to specify the ObjectSpace flag when calling the Begin() method of a Sprite. This will make the Transformations of the device apply. Then you can use the rotationX and rotate the sprite around that axis to lay it flat.

I hope this helps.
Take care.

Share this post


Link to post
Share on other sites
I coulda swore I tried that already... I think when I did it before, I wasn't setting the device's world transform but instead, was only passing that transform into the sprite's SetWorldViewLH call... I dunno... it worked this time though, thanks!

-E

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!