From 93c5cdbc71b67da7f0a1a5f5923e9bb7409a2645 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sat, 9 Feb 2013 00:42:47 +0000 Subject: [PATCH] - change PhysicsTestHelper soccer setup git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10365 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../jme3test/bullet/PhysicsTestHelper.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/engine/src/test/jme3test/bullet/PhysicsTestHelper.java b/engine/src/test/jme3test/bullet/PhysicsTestHelper.java index 282588fe2..bb057606e 100644 --- a/engine/src/test/jme3test/bullet/PhysicsTestHelper.java +++ b/engine/src/test/jme3test/bullet/PhysicsTestHelper.java @@ -114,7 +114,7 @@ public class PhysicsTestHelper { Material material = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); material.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg")); - Box floorBox = new Box(140, 0.25f, 140); + Box floorBox = new Box(20, 0.25f, 20); Geometry floorGeometry = new Geometry("Floor", floorBox); floorGeometry.setMaterial(material); floorGeometry.setLocalTranslation(0, -0.25f, 0); @@ -137,7 +137,7 @@ public class PhysicsTestHelper { rootNode.attachChild(ballGeometry); space.add(ballGeometry); } - + { //immovable Box with mesh collision shape Box box = new Box(1, 1, 1); Geometry boxGeometry = new Geometry("Box", box); @@ -146,7 +146,17 @@ public class PhysicsTestHelper { boxGeometry.addControl(new RigidBodyControl(new MeshCollisionShape(box), 0)); rootNode.attachChild(boxGeometry); space.add(boxGeometry); - + } + { + //immovable Box with mesh collision shape + Box box = new Box(1, 1, 1); + Geometry boxGeometry = new Geometry("Box", box); + boxGeometry.setMaterial(material); + boxGeometry.setLocalTranslation(4, 3, 4); + boxGeometry.addControl(new RigidBodyControl(new MeshCollisionShape(box), 0)); + rootNode.attachChild(boxGeometry); + space.add(boxGeometry); + } } /** @@ -217,7 +227,7 @@ public class PhysicsTestHelper { bulletg.setMaterial(mat2); bulletg.setShadowMode(ShadowMode.CastAndReceive); bulletg.setLocalTranslation(app.getCamera().getLocation()); - RigidBodyControl bulletControl = new RigidBodyControl(1); + RigidBodyControl bulletControl = new RigidBodyControl(10); bulletg.addControl(bulletControl); bulletControl.setLinearVelocity(app.getCamera().getDirection().mult(25)); bulletg.addControl(bulletControl);