Hey guys, I've been working on a project, but I've run into a block, and I don't know what to do. I have a circle in the bottom of the screen that rotates, and I want to have something that is attached to it and moves when the larger circle rotates. Any ideas?
NOTE: I don't want anyone to say that I should make it be the same sprite, because thats not what I want to do.
Offline
Your problem is rather vague, what do you want it for? and why can't it be one sprite?
What I'd do is have the smaller circle with and odd sprite centre (so that its centre is the centre of the other circle) and just have it rotate
Offline
I'm making a game based around this. I'm going to have a lot of interact-able elements so it can't be just one sprite, and the problem with the odd sprite center, is that its just so hard to position that properly.
Offline
Just set the center of rotation of the object you want to rotate when the other rotates to where you want on the circle. Then:
when gf clicked forever point in direction ( [direction] of [sprite circle] ) end
Offline
I want the same thing as this:
http://scratch.mit.edu/projects/gbear605/2485855
However, that makes it be part of the same sprite, and I don't want that.
Offline
pi3 wrote:
If you're still having trouble, I've made a test project here.
That is in a way what I want, but I don't want to have to change the center of rotation.
Offline
gbear605 wrote:
pi3 wrote:
If you're still having trouble, I've made a test project here.
That is in a way what I want, but I don't want to have to change the center of rotation.
Why not? It's not that hard, and it's pretty quick.
Offline
pi3 wrote:
gbear605 wrote:
pi3 wrote:
If you're still having trouble, I've made a test project here.
That is in a way what I want, but I don't want to have to change the center of rotation.
Why not? It's not that hard, and it's pretty quick.
Its because I'm gonna be making any number of them, so it would take too long, also, I just think thats unprofessional, AND I just think it would be cool to figure it out.
Offline
Bumpity Bumpity Bumpity Boo XD
Anyways, I'm guessing that the solution to my problem has to do with trig.
Offline
Ah, I get it now. I forgot about the movement factor. The code below looks roughly right for it
EDIT: Thoguh since your circle is presumably further down the screen you'll need to add a - 50 bit the the y value to make it correct. 50 is only a rough value, mind.
Last edited by BetaSmozzick (2012-04-21 17:30:33)
Offline
Maybe something like this Gbear:
when gf clicked forever go to x: (([sin v] of ([direction v] of [circle v])) * (50)) y: (([cos v] of ([direction v] of [circle v])) * (50))
Offline