Original Post
Hi I have serious problem and I will be greatfull for any help I have created app in managed Direct3D that displays large bitmap (orthophotomap) and I am able to put sptites that looks like poligons over it (I am using ortho view) Actualy I have 2 problems: Converting mouse pointer position from screen to "real world" coordinates so I can select any poligon, and allso I should be able to draw such poligons oer photomap. I did some good work but in wrong way that was complicating many things and I so had to start again - everything worked allmost fine but I had problems with poligons position (after inserting poligon was translated by vector dependent on screen position where it was created)... I am still douing some things by testing and checking - I can not figure out how Scaling matrix changes actual size of my map I am providing some code - please help First I was trying to scale world matrix now I am douing it with Projection - same problems So my matrix setup code looks like this: protected void SetupMatrices() { if(scale > 5) scale = 5; if(scale < 0.2) scale = 0.2F; device.Transform.View = Microsoft.DirectX.Matrix.RotationY((float) ( Math.PI )); device.Transform.View *= Microsoft.DirectX.Matrix.LookAtRH( new Vector3(this.cam_offset_x, -1, this.cam_offset_y), new Vector3(cam_offset_x, 0, cam_offset_y), new Vector3(0, 0, 1)); device.Transform.World = Microsoft.DirectX.Matrix.Identity; device.Transform.Projection = Microsoft.DirectX.Matrix.Scaling(scale, scale,1 ); device.Transform.Projection *= Microsoft.DirectX.Matrix.OrthoLH(dest_form.Width, dest_form.Height, -20, 20); } How can I figureout where my cursor points?