
-----------------------------------
sammi
Tue Oct 18, 2011 4:35 pm

Rotaing Planets
-----------------------------------
What is it you are trying to achieve?
< When i hit an arrow key I need to make both circles move in whatever direction that the little ball is pointing.>


What is the problem you are having?



Describe what you have tried to solve this problem



Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)








Please specify what version of Turing you are using


-----------------------------------
Tony
Tue Oct 18, 2011 4:58 pm

Re: Rotaing Planets
-----------------------------------
Describe what you have tried to solve this problem
I don't think randomly throwing commands to see if anything sticks is ever an appropriate approach. You'd need to simply sit down and figure out the math required for the movement. Don't be afraid to do calculations on paper first -- it's a great tool for figuring this kind of things out.

-----------------------------------
Zren
Tue Oct 18, 2011 4:58 pm

RE:Rotaing Planets
-----------------------------------
Basically you want the sun to follow the asteroid. Then have the asteroid move in the same direction the sun moved.

This should help:
http://compsci.ca/v3/viewtopic.php?t=17607

-----------------------------------
Aange10
Tue Oct 18, 2011 4:59 pm

RE:Rotaing Planets
-----------------------------------
When i hit an arrow key I need to make both circles move in whatever direction that the little ball is pointing.

Well you title says rotating, and considering wasd moves the planets just fine, I'm going to assume that you mean rotating them in place.

Considering your object isn't 3d, I think you mean having a sprite sheet. That topic was discussed [url=http://compsci.ca/v3/viewtopic.php?t=29415] here  if you'd like to view it.

If that doesn't help, let me know and I'll try and help you more specifically.


ALSO: I'm pretty sure the angle of my ball isn't -35,632 (:

-----------------------------------
Zren
Tue Oct 18, 2011 5:01 pm

RE:Rotaing Planets
-----------------------------------
D:

I was gonna redact/edit the link out till he attempted the math. So sir sammi, I trust in your honour to attempt drawing it out first.

-----------------------------------
Aange10
Tue Oct 18, 2011 5:06 pm

RE:Rotaing Planets
-----------------------------------
Hmm, sorry, Sammi, I may have misunderstood your question

-----------------------------------
sammi
Tue Oct 18, 2011 5:24 pm

RE:Rotaing Planets
-----------------------------------
first of all lol im a girl not a sir haha (dont worry no offense taken). Secondly i want both planets to stay together as they move around the screen.

-----------------------------------
Aange10
Tue Oct 18, 2011 5:57 pm

Re: RE:Rotaing Planets
-----------------------------------
first of all lol im a girl not a sir haha (dont worry no offense taken). Secondly i want both planets to stay together as they move around the screen.

I believe W A S D already does that...?

-----------------------------------
sammi
Tue Oct 18, 2011 5:59 pm

RE:Rotaing Planets
-----------------------------------
kay i'll look that one up

-----------------------------------
Aange10
Tue Oct 18, 2011 6:02 pm

Re: RE:Rotaing Planets
-----------------------------------
kay i'll look that one up

Well, what do you mean? It's already in the program..?

-----------------------------------
sammi
Tue Oct 18, 2011 6:46 pm

RE:Rotaing Planets
-----------------------------------
i have no idea......i couldnt find anything useful in the other posts and i couldnt find anything on google

do u mind telling me what WASD is?

-----------------------------------
Beastinonyou
Tue Oct 18, 2011 7:02 pm

Re: Rotaing Planets
-----------------------------------
He's referring to the keys, "W, A, S, D" 

Just like in games, (W) is Up, (A) is Left, (S) is Down, (D) is Right.

____
Now, Maybe you should be Re-Phrasing your Question, because it's quite difficult to determine what Exactly you wish to be done.


Title says Rotation, and apparently it involves planets, a bigger one, and a smaller one.

when you go use the keys WASD, you move both of the planets accordingly (Up, down, left or right), and when you use the Up / Down arrow, you make rotation around a specific point larger / smaller (maybe resembles gravitational force of the larger planet the smaller is revolving around.)

So, I'm assuming you want a small planet (circle) to "Orbit" around the larger planet (Large Circle).

If that is what you need, I suggest first finding a way to just get the smaller circle to revolve around the object, and you should be able to easily find how to increase the radius of the travel pattern
