in my scene I’ve created several walls as custom meshes and load several Object3d’s via OBJLoader2. I’ve created a Raycaster to select surfaces of walls. That’s all working fine so far.
Now I’d like to “attach” such an Object3d to a wall and be able to move it along the surface of the wall with DragControls and limit the movement to the area of the wall’s surface.
I looked into DragControls and found that it’s creating _plane dynamically, based on camera direction and position. Then I looked into Plane and tried to figure out how to create one specifically for the surface of a wall. I understand the math basics, but I’d like to generate such a plane based on the geometry (faces) of a wall, after selecting it and then pass it to DragControls.
How would I create such a Plane based on the face of another geometry?
Can I plug the faceNormal vector into the Plane constructor?
Is this approach viable, passing the Plane to DragControls?