How do I make Gravity Towards any object

Get help using Construct 2

Post » Wed Oct 19, 2016 8:24 am

I have one large circle and some tiny circles I want to fall tiny circles towards large circle
How this possible to do ???
Please help
Image
B
64
S
39
G
46
Posts: 656
Reputation: 32,728

Post » Wed Oct 19, 2016 8:32 am

I think you can use the physics behaviour?

https://www.scirra.com/manual/98/physics

Edit:

Apply force towards position might be what you're looking for.
Follow my progress on Twitter
or in this thread Archer Devlog
B
40
S
17
G
17
Posts: 991
Reputation: 12,654

Post » Wed Oct 19, 2016 8:42 am

tunepunk wrote:I think you can use the physics behaviour?

https://www.scirra.com/manual/98/physics

Edit:

Apply force towards position might be what you're looking for.


but this only moves object toward big circle once and then fall to down
i do not want to fall it down
big circle is like earth
Image
B
64
S
39
G
46
Posts: 656
Reputation: 32,728

Post » Wed Oct 19, 2016 12:35 pm

You can do this using the physics behavior (for the large and small circles).
First set a condition to turn off gravity
At beginning of layout -> Big Circle set Physics World Gravity to 0.

And then apply forces to each small circle
each tick -> Small Circle apply force towards position ( force, BigCricle.X, BigCricle.Y, Image point 0)
B
28
S
10
G
10
Posts: 97
Reputation: 6,584


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], tarek2 and 14 guests