瀏覽代碼

Merge pull request #5565 from WuTheFWasThat/dev

arrow's line shouldn't interfere with the cone
Mr.doob 10 年之前
父節點
當前提交
80924dbe5e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/extras/helpers/ArrowHelper.js

+ 1 - 1
src/extras/helpers/ArrowHelper.js

@@ -88,7 +88,7 @@ THREE.ArrowHelper.prototype.setLength = function ( length, headLength, headWidth
 	if ( headLength === undefined ) headLength = 0.2 * length;
 	if ( headLength === undefined ) headLength = 0.2 * length;
 	if ( headWidth === undefined ) headWidth = 0.2 * headLength;
 	if ( headWidth === undefined ) headWidth = 0.2 * headLength;
 
 
-	this.line.scale.set( 1, length, 1 );
+	this.line.scale.set( 1, length - headLength, 1 );
 	this.line.updateMatrix();
 	this.line.updateMatrix();
 
 
 	this.cone.scale.set( headWidth, headLength, headWidth );
 	this.cone.scale.set( headWidth, headLength, headWidth );