diff --git a/ball.hpp b/ball.hpp index ae58873..d774cda 100644 --- a/ball.hpp +++ b/ball.hpp @@ -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)); } /** diff --git a/block.hpp b/block.hpp index cd953da..f359964 100644 --- a/block.hpp +++ b/block.hpp @@ -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)); } diff --git a/physics_object.hpp b/physics_object.hpp index 0c3b961..0436ae5 100644 --- a/physics_object.hpp +++ b/physics_object.hpp @@ -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) :