Ok I did it via shaders I need to be able to bend the vertices and add some effects… rotate the carousel now I am stuck at the raycaster detection I need the meshes to be clickable to open a link but the regular raycaster dose not work, how can I solve this?
I don’t know if this is responsive to your question and I don’t use const much. But it seems odd to use const as a temporary variable (const worldPosition) within a subroutine.
My understanding is that variables created within a subroutine are destroyed when you exit the subroutine. But if const prevents that destruction, then you will have several const variables with the same name.
You’re not actually moving the meshes. You’re updating their geometry’s vertices. All the meshes remain at their initial position (0, 0, 0). The position you’re seeing is that of their parent, this.carouselMeshGroup.
Ok I did it via shaders I need to be able to bend the vertices and add some effects… rotate the carousel now I am stuck at the Raycaster detection I need the meshes to be clickable to open a link but the regular Raycaster dose not work, how can I solve this?
You have n planes evenly distributed around a 360° circle. Get the clicked plane’s index, multiply it by the angle step (the division of 2π by n). You may also need to adjust the angleOffset based on the carousel initial rotation.
Looks great, but it seems to be slowing down. If I’m correct, you’re creating a new geometry for each plane. Instead, you could generate one geometry and reuse it, adjusting the mesh rotations as needed. To optimize further, you could use InstancedMeshes along with a texture atlas.