Rotating Animation (i.e. a wheel) - Prevent counter clockwise #1574
Unanswered
jasoncslaughter
asked this question in
Support
Replies: 1 comment 1 reply
-
When you go from 16 - 0, you're going from ~337.5 - 0 because you're calculation could be treating location 0 as 0, but actually you want to keep adding the rotation on so it goes 337.5 - 360... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an animation that I want to rotate in a clockwise fashion... I have 16 items around a circle, from 0 radians to 2 * Pi radians, and want to rotate to each item, and then back to the original. I have that working just fine with the following:
and I am using the following when the location changes:
And using it with react-three-fiber as such:
The problem is that on the last item, it is rotating back to the original. So it is going 0 -> 1, then 1 -> 2, etc., clockwise. But on 16 -> 0 it is rotating back around counterclockwise. I thought using reverse: false should prevent that, but obviously not. Is there something I might be missing?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions