Connectables working now. On to more refactoring!
This commit is contained in:
+4
-1
@@ -13,10 +13,13 @@ namespace VISEQ::GRAPH {
|
||||
|
||||
float radius = 5.0f;
|
||||
float orbit = 14.0f;
|
||||
Vec2Df center_position;
|
||||
|
||||
void setPosition(Vec2Df pos) override {
|
||||
Vec2Df mp = {GetMousePosition().x, GetMousePosition().y};
|
||||
position = pos - ((pos - mp)).norm() * (radius + orbit);
|
||||
center_position = pos;
|
||||
if(!partner) position = center_position - ((center_position - mp)).norm() * (radius + orbit);
|
||||
if(partner) position = center_position - ((center_position - partner->position)).norm() * (radius + orbit);
|
||||
}
|
||||
|
||||
void draw() override {
|
||||
|
||||
Reference in New Issue
Block a user