Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to rotate 360 degrees #179

Closed
mrtenda opened this issue Dec 31, 2017 · 6 comments
Closed

How to rotate 360 degrees #179

mrtenda opened this issue Dec 31, 2017 · 6 comments

Comments

@mrtenda
Copy link

mrtenda commented Dec 31, 2017

I'd like to rotate a Transform by 360 degrees using DOTween to make it spin, but I can't figure out the proper way to do this according to the documentation. What would be the best way to do this? Thanks!

@Demigiant
Copy link
Owner

Ahoy!
You would need to set RotateMode.FastBeyond360 as DORotate parameter (so the tween doesn't use the shortest route) and then chain a SetRelative() to tell it to rotate "by" instead of "to" :)

@shanukp
Copy link

shanukp commented Mar 29, 2019

how to make it uniform rotation?

@shanukp
Copy link

shanukp commented Mar 29, 2019

i meant the speed

@Demigiant
Copy link
Owner

If you want a uniform speed you should set a Linear ease via:
myTween.SetEase(Ease.Linear);

@fguillen
Copy link

So, for the blockhead as me:

transform.DOLocalRotate(new Vector3(0, 0, 360), time, RotateMode.FastBeyond360).SetRelative(true).SetEase(Ease.Linear)

@Qwertyboyjulian
Copy link

need continuous rotation, no time limit. How to achieve it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants