1 | if (active == true) |
2 | x_target = x_target_original; |
3 | else |
4 | x_target = xstart; |
5 | x = lerp(x, x_target, 0.2); |
6 | if (abs(x - x_target) < 0.1) |
7 | is_on_target = true; |
8 | else |
9 | is_on_target = false; |