0

How do you find the rotation to make a plane coplanar with another plane?

Seems like such a simple question, but it's killing me.

I have a brute force way of getting the job done, matching a plane to the rotation and spinning it till its forward vector is the min of 360 angles when compared to its original before trying to make it coplanar.

1 Answers1

0
  1. take 2 normals to both planes.
  2. find rotation to fit one normal direction to another Finding quaternion representing the rotation from one vector to another

  3. found rotation is your rotation of one plane to be coplanar to other.

minorlogic
  • 1,872
  • 1
  • 17
  • 24
  • rotatingPlane.rotation = rotatingPlane.rotation * Quaternion.FromToRotation(rotatingPlane.up,otherPlane.up);
    Is this what you mean? It seems to somewhat work, but I have to call this 3-8ish times before it becomes coplanar. Otherwise thank you very much for at least getting me to this point.
    – Michael Dean Mar 07 '18 at 02:36