set position

This commit is contained in:
Solomon W. 2020-06-02 14:16:20 -04:00
parent 8d4b95c3fc
commit 4fecd0c149
2 changed files with 5 additions and 0 deletions

View File

@ -84,4 +84,8 @@ void phys_obj::calculate_vectors(std::vector<phys_obj> objects) {
} }
} }
} }
}
void phys_obj::setPosition(Vector vec) {
obj.center = vec;
} }

View File

@ -19,4 +19,5 @@ class phys_obj {
void translate(Vector vec); void translate(Vector vec);
bool checkCollision(phys_obj o); bool checkCollision(phys_obj o);
int distanceTo(Circle c); int distanceTo(Circle c);
void setPosition(Vector vec);
}; };