I'm using Managed Directx 9, and I have been able to use the project method successfully, however, I seem to be unable to use unproject correctly. Every time I look at another site I see a different set of matricies that are being used. If I have a world with a view, projection, transform, what is the correct sequence?
Shouldn't it be
Vector3 ray = new Vector3(MouseX, MouseY, 0) - this is 2D
ray.unproject(device.Viewport, device.Transform.Projection, device.Transform.View, device.Transform.World) ? Then ray.x/ray.y should be my world coordinates right?
It seems to generally be correct, however, the decimal is always slightly off and I can't figure out why when the project method is right on. After two days of pounding my head, I could use a second opinion. Thanks!