Problem aligning a CollisionShape with a spatial

hi, im here again.

im tring to align a BoxCollisionShape whit my model maded in blender.

here is an screenshot:

the collison Shape is not wrapping all my model.

here is part of my code:

public void aplicarColisionesAModelo(Spatial spacialModelo, String formaColisiones) { CollisionShape formaDeCollision; if (formaColisiones.equals("cubo")) { formaDeCollision = new BoxCollisionShape(new Vector3f(2f, 4f, 2f)); } else { formaDeCollision = CollisionShapeFactory.createMeshShape((Node) spacialModelo); } RigidBodyControl controlColisionesRigido = new RigidBodyControl(formaDeCollision, 1); spacialModelo.addControl(controlColisionesRigido); bulletAppState.getPhysicsSpace().add(controlColisionesRigido); }

what am I doing wrong?

thankyou for your answers.
:

It’s because the BoxCollisionShape extends from the model origin. Either make the barrel centered in Blender or attach the barrel to a node, add the physics control to the node and position the barrel so that it fits

thank you very much, is working