I am trying to make a series of sprites circle the screen in a constant circle
The idea is that the image of 'me' is part of a rotating back ground to give the impression of 'juggling'. I want to put several sprites on the screen that go around x 0, y 0 at a gentle, constant rotation counter-clockwise.
Any ideas for me to use would be great!
Thank you!
Offline
I wish I could simplify it, but you can use this engine: http://scratch.mit.edu/projects/Kileyme … est/872439
Which is designed to make sprites rotate around specified points on the stage. I would elaborate, but I'm short on time, I hope the notes in the project can clear it up.
Offline
use trig! or put the sprite center in the middle
Offline
Let me define some variables first.
direction: the number of degrees the ball is relative to the point it is spinning around. For example, having the ball directly right to the rotation point is 0 degrees, having it on top is 90 degrees, and so on.
distance: the distance of the ball from the rotation point.
xVal: the x value of the rotation point
yVal: the y value of the rotation point
when gf clicked set [direction v] to (0) set [distance v] to (50) set [xVal v] to (50) set [yVal v] to (50) forever go to x: ((xVal)+((distance)*([cos v] of (direction)))) y: ((yVal)+((distance)*([sin v] of (direction)))) change [direction v] by (1)This will make your sprite rotate in a circle of radius 50 pixels around the coordinate (50, 50). Change values as necessary.
Offline