Dimetric Projection - Camera.projectionMatrix?

Im trying to create a dimetric perspective as detailed here

http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/axonometric-projections-a-technical-overview-r3223#

Specifically - Dimetric 1:2 projection “top-view”

I’ve tried with an orthographic camera with 78 and 24 degree x and y rotations which produces the following results -

The vertical lines are correct but horizontal lines are off, they should run parallel to the top and bottom of the screen.

I’ve tried playing around with following code but with no luck -

var x : float = 1.0;
var y : float = 1.0;
var z : float = 1.0;

var pM : Matrix4x4;

function Start () {
    pM = Camera.main.projectionMatrix; // * Camera.main.projectionMatrix;
}

function Update () {
   
}

function LateUpdate ()
{
    Camera.main.projectionMatrix = Matrix4x4.Scale(Vector3(x, y, z)) * pM;
}

I’m completely out of my depth here and was hoping someone with better knowledge would be able to help.

I would suggest reading up a bit on how projection matrices work, and building one manually.

I did something similar, but with perspective, so it probably won’t help much, but I can post the code if you like.

Hi Japa,

So it is possible to do- thats great, I’ll start reading up on projection matrixes.

Thanks for offering to post your code, it would be really useful to have a look through it.

Code is here: armok-vision/Assets/GameWindow.cs at 155d1d0048e2977f44b7476aab89bdf7e4e77d50 · RosaryMala/armok-vision · GitHub

Very much uncommented.

Thanks, I’ll take a look later today!