I need some help from the three.js community. I faced with a problem with dynamically adding annotations to the surface of an object that has been rotated using Transform Controls.
- The user clicks on the surface of an object.
- The annotation is drawn, which is pinned to the surface of the object.
- The user rotates the object with the annotation pinned to it, following the pin point.
- The user adds the annotation again on the other side of the object.
- All added annotations rotate with the object.
Code: inspiring-currying-4n36vk - CodeSandbox
You are rotating the group containing the BoxHelper, the annotations are outside that group, that’s why the rotation is no affecting them. Try to move your annotations inside the group.
Thanks @Fennec for the answer.
I have moved the annotation rendering logic to the group that contains the box for annotations. But I still have a position issue after clicking on the rotated box surface.
Maybe you know how to get the correct position of the intersection after clicking on the Box surface?