# Spawn particles on the point 2 object collide?

Get help using Construct 2

### » Sun Apr 21, 2013 6:45 am

Could anyone explain to me how i would go about spawning particles on a point where two objects collide?

Say one object hits another, instead of just spawning particles on a set image point, dynamically determine where the object one touched object 2 and spawn particles at that position. I would love to be able to do this just to add some realism.

Thanks!
B
2
Posts: 7
Reputation: 264

### » Sun Apr 21, 2013 5:34 pm

Hmm... sounds like a very interesting conundrum. I honestly can't think of any good way to do it. This almost seems like an engine limitation.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

### » Sun Apr 21, 2013 5:40 pm

If your colliding shapes are simple, like squares, you can calculate the point of collision with some effort. For more complex collision shapes it would probably require lots of effort to get working properly.

I recall there being some discussion about the same topic recently, so try the search.
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

### » Sun Apr 21, 2013 5:44 pm

I'd also like to know how to do this...
B
45
S
17
G
6
Posts: 411
Reputation: 8,144

### » Sun Apr 21, 2013 6:30 pm

Well ... With a bit of thinking ... you can easily achieve it (Kinda) , I didn't test it with more complicated shapes tho ...

Capx - My try :P
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

### » Sun Apr 21, 2013 6:43 pm

Still didn't get quite the result I was hoping for in that thread, but for simple cases there is a solution that just requires a bit of maths.

If anyone does have a neat, preferably not third-year mathematics way to get the answer, I'd also appreciate it.
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

### » Sun Apr 21, 2013 7:15 pm

It's not really a problem that can be solved with maths - the whole issue lies with the fact that we can't get the vertex points /collision position in the event sheet.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

### » Sun Apr 21, 2013 7:49 pm

That seems like something an update would do! Yeah, stop doing tutorials.
HARMLESS SIGNATURE THAT IS VIEWED BY OTHERS AS OFFENSIVE AND CONTROVERSIAL
B
14
S
3
G
3
Posts: 356
Reputation: 4,362

### » Mon Apr 22, 2013 1:05 am

Thanks for all the replies guys. My shapes are simple so ill give your solution a look over Whiteclaws. Thanks again guys.
B
2
Posts: 7
Reputation: 264

### » Sun Jul 28, 2013 7:08 pm

Having a feature built into the next update that allows the system to return the x,y co-ordinates of where two objects are colliding would be phenomenally helpful for me!
B
6
Posts: 14
Reputation: 380

Next