From 3450b171c21eb47d213916706f19d89d3f584043 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sat, 2 Jun 2012 22:40:43 +0000 Subject: [PATCH] - change TestSweepTest to apply the location to the spatial before adding the physics control to avoid having the obstacle at 0/0/0 in the first frame git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9448 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/test/jme3test/bullet/TestSweepTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/test/jme3test/bullet/TestSweepTest.java b/engine/src/test/jme3test/bullet/TestSweepTest.java index b459be331..6f9e3fdd6 100644 --- a/engine/src/test/jme3test/bullet/TestSweepTest.java +++ b/engine/src/test/jme3test/bullet/TestSweepTest.java @@ -36,15 +36,15 @@ public class TestSweepTest extends SimpleApplication { stateManager.attach(bulletAppState); capsule = new Node("capsule"); + capsule.move(-2, 0, 0); capsule.addControl(new RigidBodyControl(capsuleCollisionShape, 1)); capsule.getControl(RigidBodyControl.class).setKinematic(true); - capsule.move(-2, 0, 0); bulletAppState.getPhysicsSpace().add(capsule); rootNode.attachChild(capsule); obstacle = new Node("obstacle"); - RigidBodyControl bodyControl = new RigidBodyControl(obstacleCollisionShape, 0); obstacle.move(2, 0, 0); + RigidBodyControl bodyControl = new RigidBodyControl(obstacleCollisionShape, 0); obstacle.addControl(bodyControl); bulletAppState.getPhysicsSpace().add(obstacle); rootNode.attachChild(obstacle);