Is it possible to display and rotate a 3d model in a 2d container?
Even asking this question sounds stupid to me!!
I want a top down style game experience but with spinning globes. Animated graphics wont do the trick, I’ll end up with hundreds of animations and don’t want that overhead. So I need a spinning model.
nkast. Yes, I guess Orthographic fits, but as an orthographic projection kind of assumes a 3d environment, can you apply orthographic to a 2d plane? It doesn’t really matter, that’s the kind of thing I’m looking for.
kosmo. Looking at the 3d examples I’d found I’d assumed I needed a world, camera, view and all that jazz, are you saying I don’t? I’ve done a bit of drawing textures onto other textures, are you saying I set a world and view then draw the model onto a sprite?
I’d sooner stay in the 2d coordinate system for the game if this is possible.
GPU rendering is all in 3D. SpriteBatch really just draws textured quads (with vertices having 3D coordinates) and applies an orthographic projection. So you can just use the same projection spritebatch uses to mix and match real 3d animations that appear in 2D and quads (using spritebatch).
World: Matrix.Identity
View: Matrix.Identity (Change this to use a camera.)
Projection: Matrix.CreateOrthographicOffCenter(0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, 0, 0, -1);