Browse Source

Use the optionalTarget for Ray.closestPointToPoint.

stephomi 12 năm trước cách đây
mục cha
commit
000ae09e45
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/math/Ray.js

+ 1 - 1
src/math/Ray.js

@@ -61,7 +61,7 @@ THREE.Ray.prototype = {
 
 		if ( directionDistance < 0 ) {
 
-			return this.origin.clone();
+			return result.copy( this.origin );
 
 		}