Hello,
first of all, i have to say that i know for/while loops are used to achieve this kind of things and it’s quite a very basic thing in programming. but it didn’t work in update method and i still haven’t figured how to use loops in update methods
anyway, i want to rotate something in my game when the character is moving, and slowly put it back to 0f, 0f, 0f when player stops moving.
i wrote a code which i can’t copy paste it here since it’s a bit long to be in a question body, that rotates my object perfectly but, the problem is when the character stops moving, the rotation jumps back to 0 and it looks bad.
i used Mathf.sin for rotating the object it’s quite perfect.
any suggestion/idea is welcomed.
Thanks.