How do I make something rotate around another thing

Get help using Construct 2

Post » Sun Mar 01, 2015 12:29 pm

How do I make something rotate around another thing,like how planets rotate around the sun
B
15
S
4
Posts: 153
Reputation: 1,385

Post » Sun Mar 01, 2015 1:14 pm

Create a box which you place in the middle of the sun. Rotate it.
Create the planets and pin it to to the box.
Make the box invisible.

Another way, probably to use calculation of cos and sin.
B
10
S
5
Posts: 220
Reputation: 1,464

Post » Sun Mar 01, 2015 1:18 pm

Easiest way would be to offset the origin of the sprite and use the Rotate behavior.

But if you are looking for a more complicated thing, like using physics and hinges and pinning objects, then it can be as complicated as you want or need.

You can also use other behaviors, like a Bullet. Then change the angle of the bullet constantly.
Frosty Elk AB
www.frostyelk.se
Have no fear, We come in peace!
B
13
S
3
G
1
Posts: 106
Reputation: 1,169

Post » Sun Mar 01, 2015 1:25 pm

If you're trying to be suer realistic, you could use the physics object and model the system using newton's laws. If you just want to cheat, you can do something like this.
You do not have the required permissions to view the files attached to this post.
Nothing goes unanswered!
B
22
S
5
G
1
Posts: 430
Reputation: 3,388

Post » Sun Mar 01, 2015 5:24 pm

Thx everybody for replying,but i will probably use ekajuan's solution.i dont understand what you mean frostyelk and biggybros i will try your capx
B
15
S
4
Posts: 153
Reputation: 1,385

Post » Sun Mar 01, 2015 5:49 pm

Yey!
B
73
S
21
G
10
Posts: 641
Reputation: 9,798

Post » Sun Mar 01, 2015 5:50 pm

I think ekajuan its the best solution
B
73
S
21
G
10
Posts: 641
Reputation: 9,798

Post » Sun Mar 01, 2015 6:52 pm

Check out this Thread: solar-system-help_t76729?&hilit=orbit+sin+cos&start=10
(brunopalermo penultimate entry, with the attached .capx)
B
21
S
5
G
2
Posts: 181
Reputation: 3,499


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests