diff --git a/src/simul/element.cpp b/src/simul/element.cpp
index 61c441bcc04884771a359535b01f709213def699..bc693b2be27ad17519a19faeb37ed2f15e78314e 100644
--- a/src/simul/element.cpp
+++ b/src/simul/element.cpp
@@ -18,7 +18,7 @@ Element::Element(b2World & world, Position p, Type t)
 	b2FixtureDef fixtureDef;
 	fixtureDef.shape = &circle;
 	fixtureDef.density = 1.0f;
-	fixtureDef.friction = 0; //0.3f;
+	fixtureDef.friction = 0.4f;
 	body->CreateFixture(&fixtureDef);
 }
 
@@ -26,4 +26,33 @@ void Element::updatePos()
 {
 	p.x = 100.*body->GetPosition().x;
 	p.y = 100.*body->GetPosition().y;
+
+	float friction = 0.5;
+	b2Vec2 velocity = body->GetLinearVelocity();
+	float32 speed = velocity.Length();
+	
+	if(speed > FLT_EPSILON)
+	{
+		float32 newSpeed = speed - friction;
+		if(newSpeed < 0)
+			newSpeed = 0;
+		velocity *= newSpeed/speed;
+		body->SetLinearVelocity(velocity);
+	}
+
+	float angularFriction = 0.1;
+	float angular = body->GetAngularVelocity();
+	if(angular > 0)
+	{
+		angular -= angularFriction;
+		if(angular < 0)
+			angular = 0;
+	}
+	else
+	{
+		angular += angularFriction;
+		if(angular > 0)
+			angular = 0;
+	}
+	body->SetAngularVelocity(angular);
 }
diff --git a/src/simul/robot.cpp b/src/simul/robot.cpp
index 562e518d88365bceef09fe4bed8de486773800f2..51382abb806ce6534c22bf652b76b2f87cf060e4 100644
--- a/src/simul/robot.cpp
+++ b/src/simul/robot.cpp
@@ -72,7 +72,7 @@ Robot::Robot(b2World & world) : olds(10000)
 	b2FixtureDef fixtureDef;
 	fixtureDef.shape = &box;
 	fixtureDef.density = 10.0f;
-	fixtureDef.friction = 0.f;
+	fixtureDef.friction = 1.0f;
 	body->CreateFixture(&fixtureDef);
 }
 
@@ -87,11 +87,12 @@ void Robot::updateForces(int dt)
 
 	float32 rdt = 1000./(float)dt;
 
-	b2Vec2 bimpulse = 0.01*rdt*b2Vec2(impulse.x.getValueInMillimeters(),impulse.y.getValueInMillimeters());
+	b2Vec2 bvelocity = 0.01*rdt*b2Vec2(impulse.x.getValueInMillimeters(),impulse.y.getValueInMillimeters());
 	float bangular = deriv.angle.getValueInRadian()*rdt;
 	//body->ApplyForce(10*body->GetMass()*(bimpulse - body->GetLinearVelocity()), body->GetWorldCenter());
 	//body->ApplyTorque((bangular - body->GetAngularVelocity())*body->GetInertia());
-	body->SetLinearVelocity(bimpulse);
+	
+	body->SetLinearVelocity(bvelocity);
 	body->SetAngularVelocity(bangular);
 
 }
diff --git a/src/simul/table.cpp b/src/simul/table.cpp
index d570d655d25bf1c12c987eb6df4f0eea25185674..09d293ab7a871a7be9f42a9afa171942e3c8108b 100644
--- a/src/simul/table.cpp
+++ b/src/simul/table.cpp
@@ -26,7 +26,7 @@ Table::Table(QWidget* parent) : QWidget(parent), world(b2Vec2(0.f,0.f), false)
 	b2PolygonShape box;
 	b2FixtureDef fixtureDef;
 	fixtureDef.shape = &box;
-	fixtureDef.friction = 0;
+	fixtureDef.friction = 0.5;
 	fixtureDef.density = 0;
 
 	box.SetAsBox(30,1, b2Vec2(0,-1),0);