Added building flipping

This commit is contained in:
2026-04-13 13:00:49 +01:00
parent 1351bb2245
commit b481b27f8b
3 changed files with 22 additions and 7 deletions

View File

@@ -16,7 +16,8 @@ namespace Fruitomation.Game
{
if (other.transform.parent.TryGetComponent(out Rigidbody2D body))
{
body?.AddForce(-transform.right * Mathf.PI, ForceMode2D.Impulse);
Vector3 force = new(-transform.localScale.x, 0f, 0f);
body?.AddForce(force * Mathf.PI, ForceMode2D.Impulse);
}
});
}