Normalizing a vector and its length is > 1 !

Hello,

void Update()
	{
		var steering = behaviour.GetSteering();
		
		// update position
		//transform.position += steering.linearVel * Time.deltaTime;
	
		rigidbody.velocity += steering.linearVel * Time.deltaTime;
		
		
		if( rigidbody.velocity.magnitude > 7f )
		{
			rigidbody.velocity.Normalize();
			
			if( rigidbody.velocity.magnitude > 1 )
			{
				Debug.Log("wtf");
			}
		}
		
		// rotation
		transform.eulerAngles += steering.rotation * Time.deltaTime;
	}

As you can see, when the length of velocity goes above 7, I normalize it, which I am pretty sure has to make its length equal to 1. So the “wtf” string should not be printed but it is. Something is wrong here, but I don’t understand what.

Why do you not use the debugger to see the values at the linese 11. 13. and 15. ?

I have found the problem. Velocity was changed because fixedUpdate() was being called in between Update() because it’s called asynchronously and was messing things up.