• Advertisement
Sign in to follow this  

MDX: Upside down billboards

This topic is 3330 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

No, I haven't moved away from MDX. I'm still dabbling and I've no need to learn XNA just yet. Yep, I've Googled. This is one of the few times Google has failed me. Yes, I found the other post on GameDev with this same problem. No, none of the solutions in the thread worked for me. Yes, I might have missed something. I've no sight in one eye and reading is hard. I still like to code anyway. Problem: I have right side up bitmaps. However, when I use the Sprite class to draw them, they're upside down. Instead of the standard up vector I use 0, 0, 1 due to the level file format I am using. I have tried all sorts of flag combinations for the Sprite.Begin arguments.
spr.SetWorldViewLH(m_Camera.World, m_Camera.View)

spr.Begin(SpriteFlags.Billboard Or SpriteFlags.ObjectSpace Or SpriteFlags.DoNotModifyRenderState)
    For Each s As GameSprite In m_Sprites.ToArray ' Cheap way to avoid exception throwing because I am too lazy to lock it
        spr.Draw(s.Texture, Vector3.Empty, s.Position, Color.White.ToArgb)
    Next
spr.End()



Pre-flipping the textures on load is not an option; they're used elsewhere, just fine, in their native nonflipped state. Using a separate texture for a flipped version is also not an option. There HAS to be a simple way to make this work properly. I have no problems getting a texture to draw right side up with no special code in 2D games. Anyone want to save my sanity?

Share this post


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

  • Advertisement