Skip to content

Commit

Permalink
[共通] fix #1075
Browse files Browse the repository at this point in the history
  • Loading branch information
Reputeless committed Sep 21, 2023
1 parent 85994b5 commit c6b3028
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Siv3D/src/Siv3D/Physics2D/P2Polygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,13 @@ namespace s3d

Polygon P2Polygon::getPolygon() const
{
if (m_fixtures.isEmpty())
{
return m_basePolygon;
}

const b2Transform& transform = m_fixtures.front()->GetBody()->GetTransform();

return m_basePolygon.transformed(transform.q.s, transform.q.c, Vec2(transform.p.x, transform.p.y));
return m_basePolygon.transformed(transform.q.s, transform.q.c, Vec2{ transform.p.x, transform.p.y });
}
}

0 comments on commit c6b3028

Please sign in to comment.