rb.Moveposition - character has tiny teleport in otherwise constant movement

I’m stumped. I don’t know why my character has a short teleport while walking. I printed some variables for debugging. Transform.forward and Time.deltaTime are consistent, so I don’t know what causes the jump in rb.position/transform.position (they are exactly the same always).

When I turn on “Is Kinematic”, the tiny teleport disappears, but then my character goes through walls. Does this mean an invisible force is being applied to my character??

// FixedUpdate for movement through force
	void Update ()
	{
		float moveHorizontal = Input.GetAxis ("Horizontal");
		float moveVertical = Input.GetAxis ("Vertical");

		//walk animation
		if (Input.GetAxis ("Vertical") > 0.2) {

			//start where foot stopped
			foreach (AnimationState animState in anim) {
				animState.speed = 1;
			}

			GetComponent<Animation> ().Play ("Walk");

			//move position
			print ("rb: " + rb.position);
			print ("tf: " + transform.position);
			rb.MovePosition(rb.position + transform.forward * Time.deltaTime * 2);

		} else 
			//stop mid animation
			foreach (AnimationState animState in anim) {
				animState.speed = 0;
			}
		
	
	}

Did you adhere to the comment you wrote at the very top of your own script? :slight_smile:
When doing anything related to physics (and that means anything to do with rigidbodies), you should use FixedUpdate(), not Update().

See if moving the MovePosition() line into FixedUpdate (as it is in the example page) solves the problem.

From my own IsKinematic clue, I found that there are weird interactions between the capsule collider and character controller. Since I didn’t really need the character controller, I removed it and it fixed the issue. (I got the idea of using both from the stealth tutorial)