sprite offset in game but not in scene

I have a small problem with my current project and hope you guys can help me out.

I’m making a small 2D game (and i mean 2D → 2d mode, 2d colliders, 2d physics, sprites, etc.).

For some reason it seems like the arm of my mage character gets offset over multiple walking cycles (not 1, so not a simple mistake in the animation). Actually it’s not just the arm, but that one is most noticeable.

The strangest part is, that the change is only visible in the game view during play, it seems fine in the scene view.

Also, the (x,y,z) coordinates seem to be as they should be (you might detect a slight offset in the “arm_offset_problem.jpg” but that is caused by the breathing idle animation).

I checked that there is no offset between the start and end of the walking animation(though that shouldn’t have any impact anyway since it loops).

I restarted unity and build the project, thinking it might be a play mode problem but it’s the same in the build game.

There is only one script that impacts the movement at all. It’s placed on the “Chibi_Mage” GameObject and lets me move around the mage (simple transform movement, don’t need physics yet; changes apply to the parent GameObject “Chibi_Mage” so it shouldn’t affect the different child sprites at all).

Below you will find the movement script and a few pictures to get a better feeling for the setup.

I’m using Unity version 4.5.2f1.

using UnityEngine;
using System.Collections;

public class ChibiBattleMoves : MonoBehaviour {

	public float walkspeed = 10f;
	public bool turnblock = false;
//	private Vector2 moveDir = new Vector2(0,0);
	private Animator myAnimator;
	// Use this for initialization
	void Start () {
		myAnimator = gameObject.GetComponent<Animator>();
	// Update is called once per frame
	void Update () {
		Vector3 move = new Vector3(Input.GetAxis("Horizontal"),
		                           Input.GetAxis("Vertical"), 0);

		gameObject.transform.position += move * walkspeed * Time.deltaTime;

		myAnimator.SetFloat("AnimWalkSpeed", move.magnitude);

		if(move.x > 0 &&
		   turnblock == false)
			gameObject.transform.localScale = new Vector3(

		if(move.x < 0 &&
		   gameObject.transform.localScale.x > 0 &&
		   turnblock == false)
			gameObject.transform.localScale = new Vector3(
				gameObject.transform.localScale.x * -1,

		if(gameObject.transform.rotation.y == 0 && move.x > 0)
			gameObject.transform.localRotation = Quaternion.Euler (0,180,0);
		if(gameObject.transform.rotation.y == 180 && move.x < 0)
			gameObject.transform.localRotation = Quaternion.Euler (0,180,0);

alt text

alt text

alt text

alt text

Off-hand, I’d guess you’re using a perspective camera when you really should be using an orthographic camera.