I want to get the coordinates of the vertices of the base of the pyramid
const geometry2 = new THREE.ConeGeometry(10, 20, 4);
const material2 = new THREE.MeshBasicMaterial({ color: 0xffff00 });
const cone = new THREE.Mesh(geometry2, material2);
scene.add(cone);
for (let index = 0; index < cone.geometry.attributes.position.count; index++) {
const point0Coordinate = new THREE.Vector3().fromBufferAttribute(cone.geometry.attributes.position, index);
point0Coordinate.applyMatrix4(cone.matrixWorld);
}
i tried to use fromBufferAttribute
but got wrong values
full code here