So, look at the image. I think it is self-describing what I want to achieve. The size of T is just for example. P0 can be also more up. Think the problem is, this computation counts on that the plane is perpendicular to P0 point. When B is directed closer to mid of the plane, then the P1 is more correct. T can be also rotated and placed differently in space.
You have point P0 and direction vector dirGlobal, they define parametric equation of the ray P0P1 (t is parameter)
X = P0.X + dirGlobal.X * t
Y = P0.Y + dirGlobal.Y * t
Z = P0.Z + dirGlobal.Z * t
Substitute these values in plane equation
A * X + B * Y + C * Z + D = 0
solve it for t and get intersection point