I have the following code:
Vector3 nearSource = new Vector3(mState.X, mState.Y, 0.0f);
Vector3 farSource = new Vector3(mState.X, mState.Y, 3.0f);
Vector3 nearPoint = Main.main.GraphicsDevice.Viewport.Unproject(nearSource, Main.main.projection, Main.main.view, Matrix.Identity);
Vector3 farPoint = Main.main.GraphicsDevice.Viewport.Unproject(farSource, Main.main.projection, Main.main.view, Matrix.Identity);
Vector3 direction = farPoint - nearPoint;
direction.Normalize();
Ray ray = new Ray(nearPoint, direction);
When my camera is facing direction DOWN, it still says that farPoint.Y is greater than nearPoint.Y
Why would it be doing this? The farpoint should be futher down if that is the direction I am facing.