Hi there i have a group of planes geometry that make up a cube and i try to rotate it facing the camera after the rotation end (this will show a different texture every time the spin end).
As you can see here when the rotation ends inside generateTarget() i get the camera position and then inside the function highlightFace i rotate the group of objects.
As you can see from the codepen, the cube rotate always with the blue side of it, even trying with planesGroup.up.set(0, 0, -1)
or other values, trying to change the up value to pass it inside the rotationMatrix.lookAt( point.position, planesGroup.position, planesGroup.up);
.
I would like to rotate towards the face of the cube that get intersected in the raycast inside highlightFace function.
Is it possible? Or am i missing something?
Thanks in advance, i’m new to three js