jBullet Collision/Physics not working as expected
- by Kenneth Bray
Below is the code for one of my objects in the game I am creating (yes although this is a cube, I am not making anything remotely like MineCraft), and my issue is I while the cube will display and is does follow the physics if the cube falls, it does not interact with any other objects in the game. If I was to have multiple cubes in screen at once they all just sit there, or shoot off in all directions never stopping. Anyway, I am new to jBullet, and any help would be appreciated.
// Constructor
public Cube(float pX, float pY, float pZ, float pSize) {
posX = pX;
posY = pY;
posZ = pZ;
size = pSize;
rotX = 0;
rotY = 0;
rotZ = 0;
// physics stuff
fallMotionState = new DefaultMotionState(new Transform(new Matrix4f(new Quat4f(0, 0, 0, 1), new Vector3f(posX, posY, posZ), 1)));
fallRigidBodyCI = new RigidBodyConstructionInfo(mass, fallMotionState, fallShape, fallInertia);
fallRigidBody = new RigidBody(fallRigidBodyCI);
}