Discuss Scratch

superfisher
Scratcher
20 posts

How to rotate a sprite (smooth)?

I am trying to rotate my sprite smoothly. Using the normal smoothing algorithm doesn't work since it can't tell the difference between -180 and 180 (They're the same).
turn cw (((67) - (direction)) / (5)) degrees

Any way I can smoothly transition without it freaking out when pointing down?
Jareddddddd
Scratcher
1000+ posts

How to rotate a sprite (smooth)?

turn cw (((67) - ((direction) + (181))) / (5)) degrees
this was the closest I could get, I really dont like the rotations are -180 to 180
Dahipuri
Scratcher
1000+ posts

How to rotate a sprite (smooth)?

superfisher wrote:

I am trying to rotate my sprite smoothly. Using the normal smoothing algorithm doesn't work since it can't tell the difference between -180 and 180 (They're the same).
turn cw (((67) - (direction)) / (5)) degrees

Any way I can smoothly transition without it freaking out when pointing down?
Hi you can use this script if you want whole rotation or change repeat time
repeat (720)
turn cw (0.5) degrees
wait (0.001) secs
end
deck26
Scratcher
1000+ posts

How to rotate a sprite (smooth)?

Powered by DjangoBB