Ray intersection with 3D quads in XNA?
问题 So I have successfully made a ray the represents the mouse unprojected into the world, and now I need to check if that ray can intersect with a quad object, here is the code I use to get the ray: public Ray GetMouseRay() { Vector2 mousePosition = new Vector2(cursor.getX(), cursor.getY()); Vector3 nearPoint = new Vector3(mousePosition, 0); Vector3 farPoint = new Vector3(mousePosition, 1); nearPoint = viewport.Unproject(nearPoint, projectionMatrix, viewMatrix, Matrix.Identity); farPoint =