How do I create particles between 2 objects?

Get help using Construct 2

Post » Mon May 08, 2017 6:27 am

Hello, I have a question, how to create a particles between 2 objects when they collide? Object are big, so I can't create particles at the object's center. Also they have different sizes, that means I can't split a distance in half. :(
B
4
S
1
Posts: 3
Reputation: 306

Post » Mon May 08, 2017 7:00 am

This is always a tricky subject to deal with, and there is no perfect solution... you can however get pretty close, depending on your sprite shapes and complexity.

Probably the best way I can think of will be, on collision between spriteA and spriteB will be to measure the angle and distance between each object... then using each objects width/height to determine the point of intersection. This can vary though if your sprite objects are complex shapes, and tends to work best if your sprite objects are built by joining multiple objects together.

You can also create imagepoints on your object andattach another (invisible) collider object to your main sprite, and use those as collision points - thus spawning your collision particles on said collider.

Hope that helps a little :)

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
81
S
34
G
40
Posts: 3,031
Reputation: 30,422

Post » Mon May 08, 2017 7:05 am

Thanks) I'll think about it :D
B
4
S
1
Posts: 3
Reputation: 306

Post » Mon May 08, 2017 7:58 pm

Check this out.

https://www.scirra.com/tutorials/902/li ... raycasting

You can run a raycasting function on collision. Depending on the shape of the objects colliding, hopefully you can get a good effect.
Mistakes were made.
B
49
S
24
G
107
Posts: 1,581
Reputation: 60,303


Return to How do I....?

Who is online

Users browsing this forum: NN81, plinkie, sublimate, TsubaRu and 10 guests