simplified shit

This commit is contained in:
2026-02-05 23:43:17 +03:00
parent b10e26e6ba
commit b7b1154f29

View File

@@ -158,21 +158,11 @@ namespace omath::collision
{
// ReSharper disable once CppTooWideScopeInitStatement
auto n = ab.cross(ao); // Needed to valid handle collision if colliders placed at same origin pos
if (near_zero(n))
{
// collinear: origin lies on ray AB (often on segment), pick any perp to escape
direction = any_perp(ab);
}
else
{
direction = n.cross(ab);
}
}
else
{
*this = {a};
direction = ao;
direction = near_zero(n) ? any_perp(ab) : n.cross(ab);
return false;
}
*this = {a};
direction = ao;
return false;
}