DennisL Posted May 11, 2015 Share Posted May 11, 2015 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.jpghttps://youtu.be/Fd7VOACEKig?t=22m32sThanks again for taking the time to help/read my question Link to comment Share on other sites More sharing options...
nuvorm Posted May 13, 2015 Share Posted May 13, 2015 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 pixiThe 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 More sharing options...
valueerror Posted May 13, 2015 Share Posted May 13, 2015 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.. drhayes 1 Link to comment Share on other sites More sharing options...
Recommended Posts