Help, Trying to rotate an object over time

I want to be able to specify the angle the object rotates to and the time it takes it to rotate to that angle

can’t seem to wrap my head around the logic

any ideas or examples?

btw I also posted this question on “Answers” over 2 days ago, but for some reason it’s still not visible :face_with_spiral_eyes: :rage:

Im not completely sure, but maybe look into vector3.lerp. with a transform.rotate

void Update
{
     Vector3 angle = transform.rotate(0, 0, 0);
     transform.rotate = Vector3.lerp (transform.position, angle, t);
     //t being the amount of time
}

I just posted a thread for help trying to slow down an object over a period of time.

I think maybe you want something like this:

if (targetDirection != Vector3.zero) {
	rotationVector = Vector3.RotateTowards(rotationVector, targetDirection, rotateSpeed * Mathf.Deg2Rad * Time.deltaTime, 1000.0f);
	rotationVector = rotationVector.normalized;

	playerTransform.rotation = Quaternion.LookRotation(rotationVector);
}

Thanks guys