Hello. I am creating a GameController based on animation root motion and am stuck with this problem. I try to rotate my player controller when slightly moving stick left stick. What I am trying to achieve is that the controller would fully rotate if I move stick to the specified direction, and even if I release stick (wouldn’t press it anymore), it would keep rotating until it reaches the needed angle. Which means, even if I push stick SLIGHTLY backwards and then release it, my character must rotate fully backwards and not just half backwards which happens now. I would be really grateful if you help me with this. Thanks. Here is my code
private void Update
{
Vector3 correctedVertical = vertical * Camera.main.transform.forward;
Vector3 correctedHorizontal = horizontal * Camera.main.transform.right;
Vector3 combinedInput = correctedHorizontal + correctedVertical;
moveDirection = new Vector3((combinedInput).normalized.x, 0, (combinedInput).normalized.z);
Quaternion rot = Quaternion.LookRotation(moveDirection);
Quaternion targetRotation = Quaternion.Slerp(transform.rotation, rot, Time.fixedDeltaTime * inputAmount * rotateSpeed);
transform.rotation = targetRotation;
}