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.
Asked
Active
Viewed 353 times
-1

kawon
- 23
- 3
1 Answers
0
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

MBo
- 77,366
- 5
- 53
- 86
-
Sorry forgot to mention, I already tried that. The problem is after conversion to local space it is shifted too. Think the problem is, this computation counts on that the plane is perpendicular to P0 point. So if the plane in space is rotated differently, then the intersection is not correct when transforming to 2D. – kawon May 22 '17 at 05:39
-
If you use right plane equation (with A,B,C coefficients defined by normal to the plane), then result should be correct – MBo May 22 '17 at 05:48
-
Yes I have right plane equation... but I had wrong plane normal all the time :-D Now it is correct. – kawon May 26 '17 at 18:37