How do I trail a moving ball?

Get help using Construct 2

Post » Mon Aug 24, 2015 4:17 am

Hi,

I have been trying to trail the path of a moving ball. Can anyone explain me how to do it, if its possible.
For example like in this game.
Image
Image

Thanks.
B
8
S
1
Posts: 40
Reputation: 868

Post » Mon Aug 24, 2015 6:19 am

You could do it by having it drop particles that follow like a trail of smoke, fading and shrinking. But they may look like bubbles if it's moving fast, and they would have to be circles, as particles don't rotate.
That could also be done with a trail of sprites, but again, would look like a chain of balls, especially when fading.

You could also use a transparent background where nothing gets erased. You put a sprite with a color (or image) matching the background over the top of the sprite with the trails, the transparency draws over the old tails, fading them slightly, making the oldest completely faded away.
You can see the effects in my modded particle demo: https://www.scirra.com/tutorials/761/particle-demo-capx

Set ALL layers "transparent" property to transparent.
In the project properties, set "Clear Background" to "NO."
Here's an example capx: https://dl.dropboxusercontent.com/u/85412219/forumposts/FadeOutDemo.capx

Image
(screenshot of the capx)
B
226
S
60
G
33
Posts: 902
Reputation: 39,989

Post » Mon Aug 24, 2015 6:46 am

Thank you very much, that's perfect!
B
8
S
1
Posts: 40
Reputation: 868

Post » Mon Aug 24, 2015 3:14 pm

If you need a portion of the screen to no leave trails, you can put in a solid image background in that area hiding the trails in the transparent area.
B
226
S
60
G
33
Posts: 902
Reputation: 39,989



Return to How do I....?

Who is online

Users browsing this forum: NN81, TsubaRu and 9 guests