Can't move character with rigidbody

Hi,

I’m restarting my adventure with unity, and I started putting together a simple code to move my rigidbody character.

However, somehow my character doesn’t move based on following script. I’m pretty sure it moved at some point but after adding animation I lost the movement, and removing animation code doesn’t help.

Could you please tell what is wrong? I can tell by debug log that the movement vector is correct.
It doesn’t error and the animation trigger works. All rigidbody settings are default.

Could it be a bug?

using UnityEngine;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {
	
	Vector3 movement;
	Rigidbody playerRigidbody;
	Animator anim;
	
	void Awake () {
		
		playerRigidbody = GetComponent <Rigidbody> ();
		anim = GetComponent <Animator> ();
	}
	
	void FixedUpdate ()
	{

		float h = Input.GetAxisRaw ("Horizontal");
		float v = Input.GetAxisRaw ("Vertical");
		
		movement.Set (h, 0f, v);
		Debug.Log (movement);
        movement = movement.normalized * 10 * Time.deltaTime;
		playerRigidbody.MovePosition (transform.position + movement);
		
				if (Input.GetButton ("Fire1"))
			anim.SetTrigger("bark");
	}
}

Thanks,
DrMah

Probably, it is because you have defined a transform.position (x,y,x) curve in your animation. So it is overwriting the calculated value.