I have a quad and I'm trying to convert its vertices so that they're facing the camera which is lying at 0,0,1 looking down the Z, or not even specifically facing the camera, just so they're facing up the Z axis. For a test example lets assume the quads vertices are currently:
vertices[0] = new Vector3(0, -1, -1);
vertices[1] = new Vector3(0, 1, -1);
vertices[2] = new Vector3(0, 1, 1);
vertices[3] = new Vector3(0, -1, 1);
so they'd be lying along the Z axis, I want to convert that into the X and Y, but I'm not sure how to. I did some googling and read that if you do x/z and y/z then it'll convert it, but the numbers didn't come out correct so I'm guessing there's more to it. In the above example I'd want the vertices converted into:
vertices[0] = new Vector3(-1, -1, 0);
vertices[1] = new Vector3(-1, 1, 0);
vertices[2] = new Vector3(1, 1, 0);
vertices[3] = new Vector3(1, -1, 0);
Any help would be appreciated,
thanks
The red point is the camera, at (0,0,2).
The blue connected square is made up of the points: (0, -1, -1) , (0, 1, -1) ,
(0, 1, 1) , (0, -1, 1) .
The green connected square is made up of the points: (-1, -1, 0) , (-1, 1, 0),
(1, 1, 0), (1, -1, 0) .
So I have this picture so far of what you have , if I can't help you with your problem I'll take it down, but what do you want to change?