Hey guys,
So I have a series of spheres inside of each other. Each sphere has a cluster of smaller spheres on them which are all connected with lines. On a per sphere basis, I have that working.
What I am trying to do now, is have each main sphere connect with all of the main spheres. So I take the last smaller sphere from each main spheres small spheres clusters and cache those positions. Then I step over all of my main spheres and create lines from big sphere 1 cluster to big sphere 2 cluster, big sphere 2 cluster to big sphere 3 cluster, etc etc.
It looks like it is creating the lines, but the problem is they aren’t pointing towards the next sphere, they are flat with the sphere where they are originating from. I’m guessing I have to tell the line to look at the next sphere but was having issues and thought I’d make a post.
for(let i = 0; i < sphereLayers.length - 1; i++){
const lineMat = new THREE.LineBasicMaterial({color: sphereLayers[i].GetCluster().color, transparent: true, opacity: 1 });
const linePoints = [];
linePoints.push(sphereLayers[i].GetLinkerNode().position);
linePoints.push(sphereLayers[i + 1].GetLinkerNode().position);
const lineGeo = new THREE.BufferGeometry().setFromPoints(linePoints);
this.line = new THREE.Line(lineGeo, lineMat);
sphereLayers[i].GetHexSphere().add(this.line);
}
Thanks guys!