Construct Time #9: Mesh trails for Construct

13

Features on these Courses

Attached Files

The following files have been attached to this tutorial:

.c3p
.c3p

Stats

2,521 visits, 3,215 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 24 Dec, 2020. Last updated 22 Jun, 2021

Hi, I don't really have the time or energy to explain everything in details, so here is the file:

JS Only

.C3P

Alternative With Events (the JS code is still in there, but disabled)

.C3P

Basically, I keep track of the N last positions and angles the trail was in, and I update the mesh from left to right to be a the last positions one by one.

I also use polar coordinates to compute the width of the trail.

You can control the trail head's position, the start width, the end width, and the trail's current rotation (currently, the rotation is automatically computed as "look at where you're going")

Here's a video of how it works

Subscribe to Construct videos now

Please do note that:

- It uses a sprite for the trail, so the trail can be textured

- It uses the mesh feature, so it'll need a version of C3 that got released after the mesh features started getting released

- I used JS to make it as performant as possible, but it can be remade using events, it's not particularly hard (or especially less performant from my testing)

- The trail doesn't suck and it's turbo blazingly fast.

thank you have a nice day happy christmas xx

EDIT: A few people asked, and I have updated the example with an alternative system written in Events entirely

All you need to do to switch from one to the other is to enable/disabled the groups. Performance wise, JS seems to be more performant the more you add trails on screen.

  • 2 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • skymen nice Job , I think Construct 3 must have a better and advanced particle effects plugin to bring more life to the games ,Construct has to update itself with more plugins and less code for developers save time !

    • Yeah the current particle system is a bit outdated, but I do think you can still make very neat effects using it, and using a bit of ingenuity.