Objects in corners dont disappear when rotating canvas
This commit is contained in:
parent
d4b70a2386
commit
c7842c2924
1 changed files with 1 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ void DrawCamera::set_viewing_area(Vector2f viewingAreaNew) {
|
||||||
changed();
|
changed();
|
||||||
}
|
}
|
||||||
float maxDim = std::max(viewingAreaNew.x(), viewingAreaNew.y());
|
float maxDim = std::max(viewingAreaNew.x(), viewingAreaNew.y());
|
||||||
WorldScalar a = WorldScalar(maxDim * 0.5f) * c.inverseScale;
|
WorldScalar a = WorldScalar(maxDim * 0.708f) * c.inverseScale;
|
||||||
WorldVec center = c.from_space(viewingAreaNew * 0.5f);
|
WorldVec center = c.from_space(viewingAreaNew * 0.5f);
|
||||||
viewingAreaGenerousCollider = SCollision::AABB<WorldScalar>(center - WorldVec{a, a}, center + WorldVec{a, a});
|
viewingAreaGenerousCollider = SCollision::AABB<WorldScalar>(center - WorldVec{a, a}, center + WorldVec{a, a});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue