   simple Matrix.LookAtLH problem (Resolved)
  Hello,I'm just beggining whith Managed DirectX.There is a thing I can't understand :I have just displayed a triangle :verts2[0] = new CustomVertex.PositionColored(new Vector3(0, 0, 1), Color.Red.ToArgb());verts2[1] = new CustomVertex.PositionColored(new Vector3(1, 0, 0), Color.YellowGreen.ToArgb());verts2[2] = new CustomVertex.PositionColored(new Vector3(-1, 0, 0), Color.Blue.ToArgb());Why when i try to view it from the Top, it shows my nothing ??myDevice.Transform.View = Matrix.LookAtLH(new Vector3(0, 6, 0),new Vector3(0, 0, 0),new Vector3(0, 1, 0));If I put new Vector3(0, 6, 0.000000001f), It works Perfectly ?Tx you for your help ![Edited by - SeeMe on May 24, 2006 11:38:00 AM]
  Perhaps your near clipping plane is at 6?  Check your projection matrix setup.   ;  Hello, my ZNear is set to 1.0f and ZFar is 100.0f ...Other strange things : If I set my position at Vector3(0, 6, -0.000000001f) I see the triangle but upside-down !...Here are my World, View and Projection matrices : myDevice.Transform.World = Matrix.Identity; myDevice.Transform.View = Matrix.LookAtLH(new Vector3(0, 6, -0.00001f),new Vector3(0, 0, 0),new Vector3(0, 1, 0) ); myDevice.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI / 4,(float)myRenderTarget.Width / (float)myRenderTarget.Height, // floats for decimal based division, not integer1.0f, 100.0f );   ;  It's me again ! :DIn fact for my little "problem", it seems that if you set both camera position and target view with the same Z value, you see nothing !Still nobody to explain ? :) Thanks you !   ;Quote:Original post by SeeMeIt's me again ! :DIn fact for my little "problem", it seems that if you set both camera position and target view with the same Z value, you see nothing !Still nobody to explain ? :) Thanks you !A usual 'lookat' algorithm fails when the vector from the eye to the target is parallel to the up vector. If you want to view your object from directly above or below, use a different vector for the 'up' argument to the lookat function.   ;  Edit:  My mistake   ;  Tx you !!!   