Turning an object by code over time in custom function

I have AI I want to turn a bit before taking a step in the new direction.
I don’t want to use update function, is this possible? The AI needs to turn over time.

you will need to use some sort of repeating function. If you’re set on not using update then you have two main options, Coroutines, or InvokeRepeating.

Coroutines will run each frame until they finish what they have to do but can have various delays depending on how they are yielded. InvokeRepeating will run a method a set number of times, with a set interval between each execution.

Hope this helps point you in the right direction.

Using the Update function, would probably be the easiest way… Though you could also use an InvokeRepeating, or a while loop in another function outside of Update, that gets called only once (so you dont have a repeating while loop), and change its rotation a slight bit every time.

Though if you do decide to use Update, you can use a clamp or a slerp, or even a simple Rotate on the object.