ScratchData LogoScratchData
Back to grandpasp's profile

Rotate Towards Direction remix

GRgrandpasp•Created June 22, 2025
Rotate Towards Direction remix
1
2
12 views
View on Scratch

Description

Credit to @awesome-llama-test for the source project and these notes. - A simple demonstration of a sprite rotating to a target direction, the direction here being to the mouse-pointer. - To find the signed difference in two directions, do: ((((target_direction - direction) + 180) mod 360) - 180) - This works correctly for all pairs of angles and will always return the difference closest to 0 (no difference greater than 180 or smaller than -180). - Changes made by me (@grandpasp): Now with Angular Velocity proportional to difference in direction. Thanks to @Chirover for the idea (and valiant attempt) to do this.

Project Details

Project ID1191208982
CreatedJune 22, 2025
Last ModifiedJune 24, 2025
SharedJune 22, 2025
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root