Anyone have ideas of how to animate a value the shortest path, in a range that can wrap? E.g 0..360 where I can go from 10 to 350 by passing through 0.
I've been looking at animate*AsState, but seems like they only act on closed ranges.
David
02/06/2024, 8:01 AM
One idea I has was to use keyframes and then snap, but it does not feel natural.
Another idea: Would be to get it as a vector. E.g 10 to 350 would be (-20) and then animating that and adding it to result.
t
Travis Griggs
02/06/2024, 4:29 PM
How long do you need it to run for? If not forever and ever.. can you just use a really long closed range, but mod the value by 360 in between application? Most code that deals with anything radial (e.g. drawing arcs, etc), will handle 1004π just as well as 2π.