AIBehavior.MecanimNavMeshPathScript.UpdateVerticalAndHorizontalMovement C# (CSharp) Method

UpdateVerticalAndHorizontalMovement() public method

public UpdateVerticalAndHorizontalMovement ( ) : void
return void
		void UpdateVerticalAndHorizontalMovement()
		{
			Vector3 offsetVector = GetCharacterOffsetVector();
			bool shouldTurn = ShouldTurn(offsetVector);
			float targetLerpH = 0.0f;

			if ( shouldTurn )
			{
				targetLerpH = GetTurnValue(offsetVector);
			}

			h = Mathf.SmoothStep(h, targetLerpH, Time.deltaTime * rotationLerpRate);
			v = Mathf.Lerp(0.2f, 1.0f, 1.0f - Mathf.Abs (h));
		}