Displaying Tiles using a Orthographic projection?

Started by
1 comment, last by Inuyashakagome16 10 years, 8 months ago

So I've been trying to display tiles in the isometric perspective for a little while now and It seems like displaying them using Matrix datatypes like View, Projection etc seemed to be the best way. The only example of drawing like this I've seen is with Models.

foreach (ModelMesh mesh in myModel.Meshes)
{
// This is where the mesh orientation is set, as well
// as our camera and projection.
foreach (BasicEffect effect in mesh.Effects)
{
effect.EnableDefaultLighting();
effect.World = transforms[mesh.ParentBone.Index] *
Matrix.CreateRotationY(modelRotation)
* Matrix.CreateTranslation(modelPosition);
effect.View = Matrix.CreateLookAt(cameraPosition,
Vector3.Zero, Vector3.Up);
effect.Projection = Projection;
//Matrix.CreatePerspectiveFieldOfView(
//MathHelper.ToRadians(45.0f), aspectRatio,
//1.0f, 10000.0f);
}
// Draw the mesh, using the effects set above.
mesh.Draw();
}
And displaying tiles seemed to be done without any matrix datatypes at all. (No View, Projection, etc)
I'm asking, is it possible to display tiles using a Orthographic Projection (matrix datatypes. Pretty much isometric) and if it is, where should i start? I've search for a while and I can't seem to find any information on this.
If i'm approaching this the wrong way, please let me know. I'm just trying to find how I should start displaying these. I know how to display tiles, just not in this perspective.
Advertisement

A typical tile is just a square or rectangular quad oriented parallel to a given plane.

A typical tile is just a square or rectangular quad oriented parallel to a given plane.

So really what I would want is a collection of quads textured, and the orientation changed to be the view I desire?

This topic is closed to new replies.

Advertisement