but what you mean "not rotating corectly"
temp.x and temp.y are 2d coordinates (on screen position)
temp.z is the distance from camera to point in 3d world.


Never say never.