Jump to content

How do I create a Y-axis trail, from an X-axis moving object


DennisL
 Share

Recommended Posts

I'm making a game in Canvas/Phaser at the moment and I'm looking for a solution for the following problem.


I need to make Y-axis trail from an object that only moves on the X-axis, so that it looks like it leaves a dust trail.


However everywhere I look people are creating trail from bouncing balls or other X/Y moving objects, this is not what I want to create.


I am using the Phaser game framework to develop the game, if there is a solution within this framework that would be supurb, but if you could help me with a pure canvas solution/idea that would be great too!


I hope I chose the right words for my explanation, below I added a picture and a small video that visualizes my wanted end result.


http://vrrsus.com/static/lastvoyage/web6.jpg


https://youtu.be/Fd7VOACEKig?t=22m32s


Thanks again for taking the time to help/read my question :)


Link to comment
Share on other sites

I think that is done with shaders.

There are a couple of other options to fake it.

Create a custom mesh and let the vertices be influenced by the player movent. You could easily set a fading image as texture.

Another option might be to have a look at filters in pixi

The most easy and ugly solution though is to have the player emit particles downwards with a timer delay.

Link to comment
Share on other sites

if you want to create a "dust trail"  particle emmiters are probably not such a bad idea..   you can define a particle emitter flow, give it a gravity, set it to scale over time and decrease the alpha value..  that way you will easily create something that looks like the smoke coming out of a combustion engine..  

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...