   Screen to world conversion
  Hi guys,I'm new to game programming, in fact this is my first post on the subject.I've been doing my head in for about a week trying to understand how to use DirectX graphics and directInput.But now I've hit a dead end. I have a birds eye view on a single sprite. When I right click I want the sprite to move to that position. The sprite does move but never to the correct position. In fact it's movement is quite erratic, in most cases it does not move far enough and in about half the cases it moves in entirely the wrong direction. I understand that there are most likely two different issues:1. I am using directInput incorrectly.2. My screen to world conversion is very wrong.I have tried so many different things I've found on the internet and thought up myself to the extent that I no longer remember what I initially had.What I sorely need is a descent tutorial that goes over this issue. Can anyone point me to one or try to point me in the right direction. I'm at my wits end.Thanks for any help you can give me guys   
  are you using orthogonal or perspective projection? how are you converting from screen to world?   ;  Sounds like the exact same problem I had, and the answer is simple: 1, check that ur input works correctly, otherwise ur just wasting time2, use for example D3DXVec3Unproject to convert something from screen to world coords   ;  StaticVoid2 I don't know the terms orthogonal or perspective.. which isn't a good sign... as far as how I was doing the conversion I was attempting to do it mathematically... and failing.Meai:1. Yes you are correct. I created a couple of tests to try to work out what the issue was. It seems that whenever I click the mouse the absolute coordinates are being reset which is really strange as I am using:m_absposition.y += mousestate.lY; m_absposition.x += mousestate.lX; where m_absposition is a "D3DXVECTOR3" that stores the coordinates and mousestate is a "static DIMOUSESTATE" used to get the state of the coordinates.The only thing I can think of is that mousestate is returning a null value for the coordinates whenever the mouse is clicked and that's reseting the absolute position to zero. That's just a wild guess and probably wrong... any ideas?2. I hadn't heard of D3DXVec3Unproject before. I've looked into it and from what little I've been able to find I assume it can be used to transform screen coordinates to world coordinates, is that correct? You wouldn't happen to know a good tutorial that explains what this method does would you? The only example I've found stops the sprite moving at all.Thanks again guys!   