private void OnCollision(CollisionData collision) { if (collision.collisionType == CollisionData.CollisionType.Rigidbody && collision.OtherRigidbody.projectile != null) { return; } if (((BraveMathCollege.ActualSign(specRigidbody.Velocity.x) != 0f && Mathf.Sign(collision.Normal.x) != Mathf.Sign(specRigidbody.Velocity.x)) || (BraveMathCollege.ActualSign(specRigidbody.Velocity.y) != 0f && Mathf.Sign(collision.Normal.y) != Mathf.Sign(specRigidbody.Velocity.y))) && ((BraveMathCollege.ActualSign(specRigidbody.Velocity.x) != 0f && Mathf.Sign(collision.Contact.x - specRigidbody.UnitCenter.x) == Mathf.Sign(specRigidbody.Velocity.x)) || (BraveMathCollege.ActualSign(specRigidbody.Velocity.y) != 0f && Mathf.Sign(collision.Contact.y - specRigidbody.UnitCenter.y) == Mathf.Sign(specRigidbody.Velocity.y)))) { StopRolling(collision.collisionType == CollisionData.CollisionType.TileMap); } }