I've been recently been having problems getting this going. Basically what I'm trying to do is take a 3d point with the camera applied and transform that point to screen space. I'm going to use this for calculating an offset for drawn screen space sprites on an isometric grid (2.5d).
From the things I've been looking at it seems as simple as multiplying
A= World*View*Proj*ViewPointScaleMat
b= vector(x, y, z);
v[4] = Ab
for i 0..2
v /= v[3];
I've also tried many variations but I can't seem to get this working. All the values I get are way off screenspace, so I'm not sure how to approach this.
Thanks.
Transforming a 3d point onto screen space
-
- Posts: 13
- Joined: Fri Apr 20, 2007 4:35 pm