- Home /
Question by
B-R-J · Jan 31, 2018 at 09:39 AM ·
rotate objecttween
Endless rotation dotween rotate
I want to rotate an object round the y axis in a constant speed infiitely. How can I do this with DoTween's Rotate methods? Ps: I tried the following on the object, but the rotation is not smooth. It stops in the middle and plays back again. "rot" is a vector 3 (0, 360,0) I set in editor.
transform.DORotate(rot, 2f, RotateMode.Fast).SetLoops(-1);
Comment
Answer by unitylearner5797 · Jan 31, 2018 at 09:55 AM
@B-R-J Try this transform.DORotate(rot,1f).SetLoops(-1, LoopType.Incremental);
Answer by cdr9042 · Jul 17, 2020 at 03:42 AM
you can also set it to rotate at constant speed:
transform.DORotate(rot, 2f, RotateMode.Fast).SetLoops(-1).SetEase(Ease.Linear);
Answer by rijstewekkie · Nov 25, 2021 at 07:24 PM
how do i rotate it on the x or z axis then @unitylearner5797 @cdr9042
Your answer
![](https://koobas.hobune.stream/wayback/20220612151640im_/https://answers.unity.com/themes/thub/images/avi.jpg)