   3d starfield wrapping problems
  I have a 3d starfield in which you can go forwards/backwards and strafe left, right, up, down. I want to wrap the stars which go off the sides, dissappear into the distance or behind the view.The problem I have is in getting the virtual xyz coords from the actual xy screen coords. I'm not sure how to reverse the 3d calculation, normally I'm ony concerned about getting the screen coords from the virtual coords.I'm using the following bit of 3d math.var scale:Number = fl / (fl + star.z);star._xscale = star._yscale = scale * 100;star._x = scrnCenterX + star.x * scale;star._y = scrnCenterY + star.y * scale;Basically the stars are only a bit of eye candy, so any tricks to achieve similar effects are welcome.   