Skip to content

Instantly share code, notes, and snippets.


Wellington Domiciano wldomiciano

View GitHub Profile
eliasdaler / OBB.cpp
Last active May 4, 2020
OBB collision check and resolution using SAT (SFML, 2D)
View OBB.cpp
// SAT collision check and resolution
// MIT license
// Usage example:
// if (testCollision(obb1, obb2, mtv)) { // obb1, obb2 - sf::RectangleShape, mtv - sf::Vector2f
// obb1.move(mtv);
// }
static const float NORMAL_TOLERANCE = 0.0001f;
using RectVertexArray = std::array<sf::Vector2f, 4>;
You can’t perform that action at this time.