Sign in to follow this  

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

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.

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

Share this post

Link to post
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.

Share this post

Link to post
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..  

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.