Need a math geeks help. point at which a line hit a plane

So i know the equation of a plane.

Ax + By +Cz = D

Normal is the normal vector to the plane.

A = normal.x
B = normal.y
C = normal.z

p1 and p2 are 2 points on the line (which will intercept a plane at some point)

X = (p2.x - p1.x)* T + p1.x
Y = (p2.y - p1.y)* T + p1.y 
Z = (p2.z - p1.z)* T + p1.z 

I also know what D equals I solved for that by moving stuff around

The problem is a need a general solution for T.

It should be something like

A ((p2.x - p1.x) * T + p1.x)) + B ((p2.y - p1.y) * T + p1.y)) + C ((p2.z - p1.z) * T + p1.z)) = D

At which point I need to isolate T But I cant see how to isolate T even if I expand it out.

Is there something i’m missing?

any help at all would be much appreciated.

FTR you know PhysX will do this for you instantaneously right,

Documentation/ScriptReference/Plane.html

also
http://www.jtaylor1142001.net/calcjat/Solutions/VPlanes/VPtIntLPlane.htm

Also FYI the classic texts

Finally - the stackexchange “math” site always results in incredibly quick answers to easy or hard arithmetic woes! nobody on here knows any math :wink: