Discuss Scratch

SkoleSamulal
Scratcher
2 posts

How to get the amount of degrees turned since x seconds has past

How would i know how many degrees a sprite has turned in the span of x seconds?
something like:

sprite (s) has turned (d) degrees in the last (x) seconds
Eason_9
Scratcher
1000+ posts

How to get the amount of degrees turned since x seconds has past

I think this fits more in Help With Scripts
-Valtren-
Scratcher
1000+ posts

How to get the amount of degrees turned since x seconds has past

You could calculate it manually by looking at the code itself to see at what rate it turns, but you could also do something like this:

“Amount turned” should be the offset in directions between the initial direction of the sprite and the current direction of the sprite in the timespan. This won't detect the total amount turned though, so if the sprite turned 30º, then -30º, it will show as zero.

Powered by DjangoBB