So I have a 6 sided cube thats 30x30x30 each side with 30x30x30 segments
originally i used
let shape = new THREE.Shape(); shape.lineTo(0, 0, 1, 0); shape.lineTo(1, 0, 1, 1); shape.lineTo(1, 1, 0, 1); shape.lineTo(0, 1, 0, 0);
and ran it through a for loop to make a 30x30 plane with selectable planes as each
shape was another mesh added to the scene.
And of course building 6 sides with each side consisting of 900 pieces which makes a total of 5400 pieces for just 1 cube would hurt the FPS
Of course being a lazy programmer decide to skip it for a few days… then decided that no shortcuts i needed to do it better…
So now im at a regular
I already know how to select an side of a cube
and wondering how to select individual segments
theres 2 ways i COULD do this…
- Find the cursor’s position and the cube’s position, rotation and zoom and do the math of whats being selected
- use raycaster somehow to select segments
so after some googling i havent found out if i even can select segments…
is it possible?
If not is there another/better way of finding out where on the 30x30 cube my mouse is selecting?
Thanks for bearing w/ me i just started on ThreeJS a couple weeks ago and am a noob