Hello, I want to set up a box around the only section of my terrain that people will be able to access. I set up a box with dimension 1700,1700,1700 & the Location to 0,2000,0. Then I set my ‘player’ Character Control, which is a Capsule Shape to the physics location 0,2000,0, so the center of each CollisionShape should be in the same point, right? & the ‘player’ will be in the exact centre of the box. Well, my ‘player’ always starts off right outside the box. I think that the box must be pushing away the Character, but i’m not sure why. This is an extract of code:
BoxShape = new RigidBodyControl(surroundingBox, 0); BoxShape.setPhysicsLocation(new Vector3f(1,2000,1)); bulletAppState.getPhysicsSpace().add(BoxShape); CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(0.5f, 1.8f, 1); player3 = new CharacterControl(capsuleShape, 0.5f); player3.setJumpSpeed(17); player3.setFallSpeed(30); player3.setGravity(20); player3.setPhysicsLocation(new Vector3f(0, 2000, 0)); bulletAppState.getPhysicsSpace().add(player3);
Does anyone have a solution?