Affinage des constantes physiques

This commit is contained in:
Mattéo Delabre 2016-03-11 16:15:11 +01:00
parent 0b39b49109
commit f0632db66f
3 changed files with 6 additions and 4 deletions

View File

@ -15,12 +15,13 @@ protected:
*/
virtual sf::Vector2f getForces(State state);
static constexpr float ATTRACTION = 10;
static constexpr float MOVE = 10;
static constexpr float ATTRACTION = 25000;
static constexpr float MOVE = 100;
public:
Ball(float x, float y) : PhysicsObject(x, y), shape(10 * mass) {
shape.setFillColor(sf::Color(150,255,20));
shape.setOrigin(sf::Vector2f(10 * mass, 10 * mass));
shape.setFillColor(sf::Color(255, 245, 131));
}
/**

View File

@ -14,6 +14,7 @@ public:
static constexpr float GRID = 32;
Block(float x, float y) : Object(x, y), shape(sf::Vector2f(Block::GRID, Block::GRID)) {
shape.setOrigin(sf::Vector2f(Block::GRID / 2, Block::GRID / 2));
shape.setFillColor(sf::Color(0, 0, 0));
}

View File

@ -16,7 +16,7 @@ protected:
*/
virtual sf::Vector2f getForces(State state);
static constexpr float GRAVITY = 10;
static constexpr float GRAVITY = 275;
public:
PhysicsObject(float x, float y) :