Skip to content
Snippets Groups Projects
Commit 1d3a9bc8 authored by Enes Ayata's avatar Enes Ayata
Browse files

Correction de l'amortissement linéaire

parent 4d925c9a
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ public class AndroidController implements InputProcessor {
public AndroidController(GameWorld gameWorld){
super();
this.gameWorld=gameWorld;
this.coeff=50;
this.coeff=500;
this.vitesse= new Vector2();
this.vitesse2= new Vector2();
this.pointeurJ1=-1;
......
......@@ -30,7 +30,7 @@ public class DesktopController implements InputProcessor {
public DesktopController(GameWorld gameWorld){
super();
this.vitesse= new Vector2();
this.coeff= 100;
this.coeff= 500;
this.gameWorld=gameWorld;
}
......
......@@ -22,7 +22,7 @@ public class DesktopControllerBis implements InputProcessor {
public DesktopControllerBis(GameWorld gameWorld){
super();
this.vitesse=new Vector2();
this.coeff=100;
this.coeff=500;
this.gameWorld=gameWorld;
}
......
......@@ -85,6 +85,7 @@ public class Ballon extends Sprite {
fixtureDef.density = 1.f;
fixtureDef.friction = 1.5f;
fixtureDef.restitution = 0.5f;
body.setLinearDamping(1.5f);
CircleShape shape = new CircleShape();
float rayonB =terrain.getWidth()/85;
......
......@@ -106,6 +106,7 @@ public class JoueurDeux extends Sprite {
fixtureDef.density = 1.f;
fixtureDef.friction = 1.5f;
fixtureDef.restitution = 0.25f;
body.setLinearDamping(1.5f);
CircleShape shape = new CircleShape();
float rayon = terrain.getWidth()*(float)0.025;
shape.setRadius(rayon);
......
......@@ -111,6 +111,7 @@ public class JoueurUn extends Sprite {
fixtureDef.density = 1.f;
fixtureDef.friction = 1.5f;
fixtureDef.restitution = 0.25f;
body.setLinearDamping(1.5f);
CircleShape shape = new CircleShape();
shape.setRadius(rayon);
fixtureDef.shape=shape;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment