Improving smoothness of arrow helper head

The head on my arrow helper looks faceted, can this be improved?
image

It’s hardcoded. The head part has 5 radial segments: three.js/ArrowHelper.js at 191a1ef699a5d53de2cd645c667e7fee184a18fd · mrdoob/three.js · GitHub

arrowHelper = new THREE.ArrowHelper(direction.normalize(), from, length, 0x000000, 0.01, 0.01);

change last two values according to your need…

that’s the length and width, not the number of segments

well that’s annoying, is it possible to overwrite them after creation?

Also show your code how you are creating arrow helpers

@bmb No, but you can substitute it with another geometry, with greater amount of segments.

@prisoner849 you mean literally just replace it with another cone? e.g. arrowhelper.cone = my new cone with more segments

I mean something like this:

arrowhelper.cone.geometry.dispose();
arrowhelper.cone.geometry = new CylinderGeometry( 0, 0.5, 1, 10, 1 );
arrowhelper.cone.geometry.translate(0, -0.5, 0);
1 Like

Great nice one! Does the trick. I know the original arrow helper uses cylinder, but I ended up using cone just to make it more logical for me.

Thank you for your help

1 Like