Some of my objects try to rotate towards a certain direction

I’ve created some physics objects. However, they always try to rotate so they’re standing upright (They move kinda like they’re connected to the ground with rubber. - It’ll start off on an angle then go back to the centre, but go to far and then have to get back again, kinda like a pendulum. But it eventually reaches the centre). Odd thing is, it rotates upright irregardless of the rotation of the mesh (I’m rotating the .obj, I’m not using model.setLocalRotation or anything like that).



He’s the code that creates the physics object:



super.init(world);

RigidBodyControl phy = new RigidBodyControl(CollisionShapeFactory.createDynamicMeshShape(model),1f);

model.addControl(phy);

phy.setPhysicsLocation(new Vector3f(x, y, z));

phy.applyTorqueImpulse(Vector3f.UNIT_X);

phy.setGravity(Vector3f.UNIT_X.negate());

bulletAppState.getPhysicsSpace().add(phy);



super.this is calling:



this.world = world;

if (model == null) {

model = new Node(name);

Spatial obj = world.assetManager.loadModel("/Models/"+modeldir+".obj");

Material mat = new Material(world.assetManager, “Common/MatDefs/Light/Lighting.j3md”);

obj.setMaterial(mat);

model.attachChild(obj);

}

world.entityNode.attachChild(model);



Is there anything wrong there? Or is my problem hidden away in some other code? I don’t mess with bullet too much