Comments and answers for "Point on a Plane between two points"
http://answers.unity.com/questions/1602880/point-on-a-plane-between-two-points.html
The latest comments and answers for the question "Point on a Plane between two points"Answer by MomentsStudio
http://answers.unity.com/answers/1602911/view.html
It turns out getting the equation from the plane was not too hard.
Vector3 PointOnPlaneBetweenTwoPoints(Plane p, Vector3 a, Vector3 b){
Vector3 q = (b-a);
q.Normalize();
Vector3 planeEqation;
Vector3 pointOnPlane = p.ClosestPointOnPlane(Vector3.zero);
Vector3 normal = p.normal;
planeEqation = normal;
float offset = Vector3.Dot(pointOnPlane,normal);
Debug.Log(planeEqation);
float t = (offset-Vector3.Dot(a,planeEqation))/Vector3.Dot(q,planeEqation);
return a+(q*t);
}
If anyone else ever needs this feel free to use it.Sun, 17 Feb 2019 19:33:13 GMTMomentsStudioComment by MomentsStudio on MomentsStudio's comment
http://answers.unity.com/comments/1602903/view.html
To clarify the plane is the built -in class [Plane][1] not a physical one
[1]: https://docs.unity3d.com/ScriptReference/Plane.htmlSun, 17 Feb 2019 19:00:01 GMTMomentsStudioComment by RobAnthem
http://answers.unity.com/comments/1602882/view.html
Assuming you have a collider on the plane, you can get the middle between both points and use Collider.ClosestPoint like so
Vector3 pointOnPlane = myPlaneObject.GetComponent<Collider>().ClosestPoint(centerPointOfTwoPoints);
Rereading your question now, I think it may actually be easiest to Raycast between the two points, and if the ray hits the plane, then you found your intersecting point. Something to note though, if your plane is 1-sided you would need to set your physics to query backfaces.Sun, 17 Feb 2019 18:20:09 GMTRobAnthem