Check out this relevant codepen:
http://codepen.io/OpherV/pen/yNebep
In the game I am working on, there is a unique alien tree model. To create spikes on each face of the tree, I am generating pyramids using CylinderGeometry
with 4 faces and positioning them in the middle of each face. My goal is to have these pyramids perpendicular to the face for a spiked tree effect. However, when using object.lookAt
to point towards the face normal, unexpected results occur.
For instance, applying the rotation matrix
cylinderGeometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) );
causes the shape in the center to look correct, but the rest remains distorted.
What is the correct approach to achieving my desired spiked tree?
Bonus question
After creating and orienting these spikes properly, how can I merge them back into the original geometry to avoid having numerous separate objects?