diff --git a/src/main/java/com/jme3/bullet/collision/shapes/CustomConvexShape.java b/src/main/java/com/jme3/bullet/collision/shapes/CustomConvexShape.java index c477c60a..2a66dfc9 100644 --- a/src/main/java/com/jme3/bullet/collision/shapes/CustomConvexShape.java +++ b/src/main/java/com/jme3/bullet/collision/shapes/CustomConvexShape.java @@ -143,6 +143,10 @@ protected CustomConvexShape(Vector3f halfExtents) { * @param iz the desired Z-axis rotational inertia for mass=1 (>0) */ protected void setScaledInertia(float ix, float iy, float iz) { + Validate.positive(ix, "X-axis inertia"); + Validate.positive(iy, "Y-axis inertia"); + Validate.positive(iz, "Z-axis inertia"); + inertia.set(ix, iy, iz); long shapeId = nativeId();