diff --git a/src/extras/core/CurvePath.js b/src/extras/core/CurvePath.js index 20590f77c9db95..bc05ccc616ff79 100644 --- a/src/extras/core/CurvePath.js +++ b/src/extras/core/CurvePath.js @@ -33,7 +33,8 @@ class CurvePath extends Curve { if ( ! startPoint.equals( endPoint ) ) { - this.curves.push( new Curves[ 'LineCurve' ]( endPoint, startPoint ) ); + const lineType = ( startPoint.isVector2 === true ) ? 'LineCurve' : 'LineCurve3'; + this.curves.push( new Curves[ lineType ]( endPoint, startPoint ) ); }