Problem with collisions

i have a problem whit collisions, when my character collides with a big object all is fine, but when my character collides with a small object the fps descrease drastically, and my game run very slow.

some screenshots:

an big object like atree.

an samll object like a mushroom.

and my code for my static models:
public void cargarModelosEscenario(String idEscenario){

     controladorBaseDatos controladorBD= new controladorBaseDatos();
     Modelo[] modelos=controladorBD.obtenerDatosAmbientePorEscenarioBD(idEscenario);
      for(int modeloActual=0;modeloActual<modelos.length;modeloActual++){
            Spatial modelo=assetManager.loadModel(modelos[modeloActual].getModeloXML());
            CollisionShape sceneShape = CollisionShapeFactory.createMeshShape((Node) modelo);
            RigidBodyControl landscape = new RigidBodyControl(sceneShape, 0);


my code for my character:
private CharacterControl controlNPC;
private Node nodoPrincipal= new Node();
private Spatial npc ;

public void simpleInitApp() {   

bulletAppState = new BulletAppState();

private void cargarNPC(){
npc = assetManager.loadModel("Models/otromesh/Cube.002.mesh.xml");
Material material = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
material.setTexture("ColorMap", assetManager.loadTexture("Textures/madera.jpg"));
npc.setLocalTranslation(-100f, 5f, 10f);



 private void crearFisicaNPC(){              //agregando  fisica al bicho------------------------------
CapsuleCollisionShape capsuleShape2 = new CapsuleCollisionShape(1f, 0f, 1);

controlNPC = new CharacterControl(capsuleShape2, 1f);

if i resize my mushroom to make it biger, it work fine.
if many objects collide with my character i have the same problem.

i hope somebody help me, and sorry for my bad english.

[java]CapsuleCollisionShape capsuleShape2 = new CapsuleCollisionShape(1f, 0f, 1);[/java]

your character has 0 height :-/

I also suggest you use:

[java]bulletAppState.getPhysicsSpace().enableDebug (assetManager);[/java] so that you can see your collisionshapes in more detail.

Bullet has a hard time with collisions involving very small triangles

a low performance is normal?

a screenshot:

is your first issue solved?

It depends on your hardware, you have 375 objects, try lower that by batching

i need increase the perfomance when my character cillide with small objects,
Is there any way to increase the size of the triangles?

That’s only really an issue for your original post (in physical collisions), but using simpler collision shapes would help regardless


@wezrule said: you have 375 objects, try lower that by batching
@eypidemik said: i need increase the perfomance when my character cillide with small objects, Is there any way to increase the size of the triangles?
Just don't wrap them with a mesh. Mark them with UserData or something and then make them boxes or hulls or something similar.

Mark them with UserData? i don’t understand that.

thanks i used boxshape for small objects