From dd7ea3d2a7a93ce2373f67a12a9e8f17e28d90f7 Mon Sep 17 00:00:00 2001 From: Nehon Date: Fri, 10 Oct 2014 18:43:16 +0200 Subject: [PATCH] Fixed Spline and MotionPath init issue when setting a curve tension before adding way points --- jme3-core/src/main/java/com/jme3/math/Spline.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/math/Spline.java b/jme3-core/src/main/java/com/jme3/math/Spline.java index dccab9953..041baa0ba 100644 --- a/jme3-core/src/main/java/com/jme3/math/Spline.java +++ b/jme3-core/src/main/java/com/jme3/math/Spline.java @@ -316,7 +316,7 @@ public class Spline implements Savable { */ public void setCurveTension(float curveTension) { this.curveTension = curveTension; - if(type==SplineType.CatmullRom) { + if(type==SplineType.CatmullRom && !getControlPoints().isEmpty()) { this.computeTotalLentgh(); } }