If I’m understanding this correctly, you want a similar transformation operation to the one you are doing above, but applied to the increment variable itself such that the main operation still reaches its target in the set time, but slows down as it becomes closer. To do that, you would need to do a bit of calculus by tracking function derivatives. Here is an example of what I mean;

In the above graph, the x-axis is time and the y-axis is value;

- The purple line is your main function f(x) (the object’s rotation)
- The green line is the first derivative f’(x) (how much the rotation changes over time)

In this case, the main function is linear and reaches its destination directly because the derivative is fixed (like your above increment). But, if we instead also change the first derivative over time;

Where;

- The blue line is the main function f(x)
- The red line is the first derivative f’(x)
- The orange line is the second derivative f’'(x) (how much the first derivative changes over time)

You’ll notice the main function still reaches its destination in the same time frame, but it slows down as it gets there. As a result, the first derivative is now a linear function, and we have a second derivative that is constant. Assuming this is the result we are going for, all we need to do is figure out the second derivative and use it to change the first.

Let’s start by finding a main function to get a curve with a falloff towards the point. The function you already have would equate to;

f(x) = d (x / s)

Where;

- d = degrees to rotate
- s = total time of the operation in seconds

A function that would give you a smooth falloff towards the target would be;

f(x) = -d ((x / s) - 1)² + d

Which expands to;

f(x) = -dx² / s² + 2dx / s

Next, we find the first derivative;

f’(x) = -2dx / s² + 2d / s

Finally, we can find the second derivative;

f’'(x) = -2d / s²

Now that we know the second derivative for our desired function, we can start tracking things in code;

```
//This is your 'increment' variable
private float dx = 0f;
private void Start ()
{
//Initialise the first derivative to its function at 0 seconds, i.e. f'(0)
dx = 2f * degrees / seconds;
}
private void Update ()
{
//Calculate the second derivative
float dx2 = -2f * degrees / (seconds * seconds);
//Add the increment to the rotation before we update it so that we actually reach the desired point (I clamp it to zero so that the function doesn't go backwards once we get there)
rotation += Mathf.Max (0f, dx) * Time.deltaTime;
//Finally, add the second derivative to the first. Also scale this by deltaTime
dx += dx2 * Time.deltaTime;
}
```

Hope that helps,

Namey5.