[SOLVED] Orient plane to intersected face normal and direction vector


i’ve been trying to figure out how to create and orient a plane between a previosly intersected point (Vector3 saved as a variable) and my next intersection point… see image…

the blue point with the red plane pertruding from it is the first saved point but i would like the red plane to connect to the lonesome blue dot.

would anyone know a formula to make the red plane connect to the second blue point while facing the cubes face ( depending on what side the intersection happens )?

what i am trying at the minute ( not working, it’s creating the result in the image above )…

     plane.scale.set(1 * start.distanceTo(Intersects[0].point), 0.4)
     dir.subVectors( start, Intersects[0].point).normalize();

@prisoner849 any ideas?

Any reference/explanatory picture of the desired result?
So far I didn’t get, what you want to achieve :thinking:

yes of course,

this is the desired result ( this only works because the planes scale is simply increasing on the x axis based on the distanceTo() the second point )

what i would like to achieve is the same thing but between any 2 randomly intersected points, so that the red plane always lays on the face of the cube and goes between point 1 and 2 if that makes sense?

it will basically be a tape measure type tool


Solved the issue
I was being silly and trying to scale, transform and make rotations on the X axis, what fixed the issue was rotating the plane geometry onto the Z axis plane.geometry.rotateY(90 * Math.PI / 180) and then go on to scale the plane on the Z axis and lookAt point 2