Added building flipping
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user