From 38e4580857e032137741278563645cbf14ff6903 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Fri, 27 Mar 2015 23:37:13 -0400 Subject: [PATCH] TestSweepTest: fix crash on native bullet (natives not loaded when shapes are created) --- .../src/main/java/jme3test/bullet/TestSweepTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jme3-examples/src/main/java/jme3test/bullet/TestSweepTest.java b/jme3-examples/src/main/java/jme3test/bullet/TestSweepTest.java index 6f9e3fdd6..c8bd631d9 100644 --- a/jme3-examples/src/main/java/jme3test/bullet/TestSweepTest.java +++ b/jme3-examples/src/main/java/jme3test/bullet/TestSweepTest.java @@ -21,8 +21,8 @@ import java.util.List; public class TestSweepTest extends SimpleApplication { private BulletAppState bulletAppState = new BulletAppState(); - private CapsuleCollisionShape obstacleCollisionShape = new CapsuleCollisionShape(0.3f, 0.5f); - private CapsuleCollisionShape capsuleCollisionShape = new CapsuleCollisionShape(1f, 1f); + private CapsuleCollisionShape obstacleCollisionShape; + private CapsuleCollisionShape capsuleCollisionShape; private Node capsule; private Node obstacle; private float dist = .5f; @@ -33,6 +33,9 @@ public class TestSweepTest extends SimpleApplication { @Override public void simpleInitApp() { + obstacleCollisionShape = new CapsuleCollisionShape(0.3f, 0.5f); + capsuleCollisionShape = new CapsuleCollisionShape(1f, 1f); + stateManager.attach(bulletAppState); capsule = new Node("capsule");