How do I make physics push objects away from a certain point

Get help using Construct 2

Post » Tue Sep 23, 2014 5:52 pm

I have a missile, and after 500 pixels I want it to destroy and explode and push everything around it out from the center (the missile) of the blast.

I talked with my teacher about it, and he suggested a couple of ways, but all of which were difficult. Is there an "easy" way to do this?
B
6
S
1
Posts: 90
Reputation: 840

Post » Tue Sep 23, 2014 7:38 pm

set the movement angle of all objects around the blast to angle(missile.x,missile.y,object.x,object.y)
so when using physics it would mean giving an impulse at that angle
when using other behaviours it would be the angle of movement..

if you want to figure out the speed or amount of impulse you could do that by basing it on the distance: distance(missile.x,missile.y,object.x,object.y)

for speed divide a top speed with this distance and for impulse divide impuls strength with this distance..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: jezjones24, Yahoo [Bot] and 21 guests