Inversed rotation angle in drawables, to make it match the Y axis pointing down in SFML (fixes issue #3)
This commit is contained in:
parent
ba8a36990f
commit
f6bbbb6e6d
@ -107,7 +107,7 @@ inline Matrix3 Matrix3::operator *(const Matrix3& right) const
|
|||||||
inline Matrix3 Matrix3::Transformation(const Vector2f& origin, const Vector2f& translation, float rotation, const Vector2f& scale)
|
inline Matrix3 Matrix3::Transformation(const Vector2f& origin, const Vector2f& translation, float rotation, const Vector2f& scale)
|
||||||
{
|
{
|
||||||
// Combine the transformations
|
// Combine the transformations
|
||||||
float angle = rotation * 3.141592654f / 180.f;
|
float angle = -rotation * 3.141592654f / 180.f;
|
||||||
float cosine = static_cast<float>(std::cos(angle));
|
float cosine = static_cast<float>(std::cos(angle));
|
||||||
float sine = static_cast<float>(std::sin(angle));
|
float sine = static_cast<float>(std::sin(angle));
|
||||||
float sxCos = scale.x * cosine;
|
float sxCos = scale.x * cosine;
|
||||||
|
Loading…
Reference in New Issue
Block a user