The are two processes involved here. The first one is to obtain a ray (or line) toward the place the user feels the mouse is pointing to. The second one is to resolve the line and plane intersection equation.
Use the camera view-projection matrix to resolve the direction of the mouse. MVP matrix transform a point in space into screen coordinates so one can think that the inverse would transform a point in screen space into world space. As the camera is projecting the scene into a virtual plane called near plane you will get a point within that plane. Then trace a line from the camera position towards that near-plane point and you obtain a ray that goes into the scene. An example in java:
public Vector3 rayDirectionForViewportCoordinate(float x, float y){
float normalized_x = 2.f * x / _viewportWidth - 1.f;
float normalized_y = 1 - 2.f * y / _viewportHeight;
Matrix.multiplyMM(mvp_f, 0, this.getProjectionMatrix().getAsArray(), 0, this.getViewMatrix().getAsArray(), 0);
Matrix.invertM(inv_mvp_f, 0, mvp_f, 0);
Matrix4 inv_mvp = new Matrix4(inv_mvp_f);
Vector4 near_point = inv_mvp.mul(new Vector4(normalized_x, normalized_y, 0 , 1));
float w = 1.f/near_point.getW();
Vector3 point = new Vector3(near_point.getX()*w, near_point.getY()*w, near_point.getZ()*w);
point.subNoCopy(_position);
point.normalizeNoCopy();
return point;
}
After you have obtained the ray, use any plane-line solver out there to test at which place that casted ray intersects your plane.
Move the ray origin and direction into object space (your rotation&translation matrix you want to check against). Use the inverse of the model matrix for that specific object. For example by multiplying the ray's origin against the inverse of the object model matrix you effectively move the origin into object space. Do the same with the direction and check if the line hits the plane using. Alternatively, rotate the plane and do the maths in world space.
If this is not clear enough drop me a message.