I'm not sure if I'm wording this correctly, but I want to set up a space-like physics system in jme3. I have the BulletAppState
setup and several RigidBodyControl
enabled spheres.
// Setting up BulletAppState
physics = new BulletAppState();
getStateManager().attach(physics);
physics.getPhysicsSpace().setGravity(Vector3f.ZERO);
// In each sphere Geometry object I call:
public void setPhysics(BulletAppState state, float mass) {
rigidBodyControl = new RigidBodyControl(mass);
addControl(rigidBodyControl);
rigidBodyControl.setKinematic(true);
state.getPhysicsSpace().add(this);
}
I'd like to have these objects attract each other (like planets) based on their mass. Is this already implemented in jme's jBullet library?