Hello everyone! I’m re-creating a tunnel with react-threefiber using the code from this tutorial in vanilla Three.js.
I am stuck to implement the user interaction: the shape of the tube moves according to the mouse movement. I am using THREE.Vector2 to get the mouse’s position + useFrame to move the camera.
thanks a lot @drcmda I am now trying to do the interaction with camera and mouse.state taken from useFrame and it works for the camera movement, but for some reason it doesn’t work for updating the curve’s points: when I console.log the values, I see that the points are not updating.
I guess it has to do with verticesNeedUpdate but I don’t manage to set it…
that it pure threejs now, i don’t know if you have to update the vertex buffers directly and then call verticesNeedsUpdate=true or something like that. don’t know what tube does internally or how it can be altered afterwards.