I'm so sorry , the reason is I use the particle by a wrong way, about 200 particles are visible in the world. I change they are invisible , the framerate is Ok now (30fps) .
Another question: about the camera follow the player (car) , I use the code take from the car example, when the car translate fast , the distance between camera and player is becomes far , I want the camera near the player , change the offset , but no effect , I don't know why? How to ajust it by car speed ? Thanks a lot !
final float Voffset = 8.6f;
final float Hoffset = 50f;
Camera camera = world.getCamera();
// Making this interpolation based on ticks fixes the jitter on low fps
SimpleVector center=player.getTransformedCenter();
SimpleVector oldCamPos=camera.getPosition();
SimpleVector oldestCamPos=new SimpleVector(oldCamPos);
oldCamPos.scalarMul(4f);
SimpleVector camPos=new SimpleVector(center);
SimpleVector zOffset=player.getZAxis();
//SimpleVector yOffset=new SimpleVector(0, -18*zoomFactor*zoomFactor, 0);//50 (10)
SimpleVector yOffset=new SimpleVector(0, -Voffset*zoomFactor, 0);
//zOffset.scalarMul(-80f*zoomFactor*zoomFactor); //70
/*if(player.speed != 0)
zOffset.scalarMul(-30f*zoomFactor); //70
else
zOffset.scalarMul(-30f*zoomFactor);
*/
//if(player.speed > 0)
// zOffset.scalarMul(-50f*zoomFactor /player.speed);
//else
/*
if(player.speed == 0)
zOffset.scalarMul(-Hoffset*zoomFactor);
else
zOffset.scalarMul(-Hoffset*player.maxSpeed/(player.speed) );
*/
zOffset.scalarMul(-Hoffset*zoomFactor);
camPos.add(zOffset);
camPos.add(yOffset);
camPos.add(oldCamPos);
camPos.scalarMul(0.2f); //0.2f 1/(4+1)
SimpleVector delta=camPos.calcSub(oldestCamPos);
float len=delta.length();
if (len!=0) {
camera.moveCamera(delta.normalize(), len);
}
camera.lookAt(center);