flip() doesn't work. We need formal flipping commands in the animator.

So I’ve been flipping my sprites left and right using the same code shown in the few demos we’ve seen so far:

	protected void Flip()
	{
		facingRight = !facingRight;
		Vector3 theScale = transform.localScale;
		theScale.x *= -1;
		transform.localScale = theScale;
	}

I’ve found this to be insufficient.
Most notably, this will double-trigger an OnCollisionEnter2D call. When the scale is inverted like that anything bumping the collision gets treated as if it stopped colliding and then collided again. This leads to problems because OnCollisionEnter2D gets called twice.

Example 1: An enemy simply walks forward and turns around if he bumps into a wall or another enemy. When the enemy bumps into the other enemy, it calls flip(). But once it has flipped, it immediately registers the OnCollisionEnter2D for colliding with the same enemy, and calls flip() once again. This results in the two enemies perpetually flipping every frame while making no movement.

Example 2: A player touches an enemy and receives damage. If the player then turns around, as if to move away from the enemy, the flip() command causes the collision to be triggered again, and the player is hurt once again.

While those two examples could be resolved with custom solutions (for the first example, add a counter that ignores every other collision with a fellow enemy; for the second example, add a temporary invincibility,) this really is an inherent problem with the flip() method in itself. If left unchecked, it can cause collision calls in a number of unexpected ways, leading to more problems needing custom solutions. It just becomes like putting duct tape on everything rather than fixing a leak.

If you can, please report this using bug reporter tool as they don’t typically check the forums.

I’m also wondering if anyone has any other ideas as to how to perform a mirrored animation.
But thank you for alerting me to that option. I have submitted a bug report.

See this related thread…
http://forum.unity3d.com/threads/216657-Flipping-Sprites-Colliders